ALTER TABLE admin_access add popup_image int(1) NOT NULL default '0' AFTER orders_edit;
ALTER TABLE admin_access add csv_backend int(1) NOT NULL default '0' AFTER popup_image;
ALTER TABLE admin_access add products_vpe int(1) NOT NULL default '0' AFTER csv_backend;
UPDATE admin_access SET popup_image = '1', csv_backend ='1', products_vpe = '1' WHERE customers_id = 1;
UPDATE admin_access SET popup_image = '2', csv_backend ='2', products_vpe = '2' WHERE customers_id ='groups';
ALTER TABLE orders add afterbuy_success INT(1) DEFAULT'0' NOT NULL AFTER language;
ALTER TABLE orders add afterbuy_id INT(32) DEFAULT '0' NOT NULL AFTER afterbuy_success;

ALTER TABLE products add products_vpe int(11) NOT NULL AFTER products_fsk18;
ALTER TABLE products add products_vpe_status int(1) NOT NULL DEFAULT '0' AFTER products_vpe;
ALTER TABLE products add products_vpe_value decimal(15,4) NOT NULL AFTER products_vpe_status;

CREATE TABLE products_vpe (
products_vpe_id int(11) NOT NULL default '0',
language_id int(11) NOT NULL default '0',
products_vpe_name varchar(32) NOT NULL default ''
);

DELETE FROM configuration WHERE configuration_key='ALLOW_GUEST_TO_TELL_A_FRIEND';


INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'DEFAULT_PRODUCTS_VPE_ID', '', 6, 0, NULL, '', NULL, NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'CSV_TEXTSIGN', '"', '20', '1', NULL , '0000-00-00 00:00:00', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'CSV_SEPERATOR', ';', '20', '2', NULL , '0000-00-00 00:00:00', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'COMPRESS_EXPORT', 'false', '20', '3', NULL , '0000-00-00 00:00:00', NULL , 'xtc_cfg_select_option(array(''true'', ''false''),');


INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'AFTERBUY_PARTNERID', '', '21', '2', NULL , '0000-00-00 00:00:00', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'AFTERBUY_PARTNERPASS', '', '21', '3', NULL , '0000-00-00 00:00:00', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'AFTERBUY_USERID', '', '21', '4', NULL , '0000-00-00 00:00:00', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'AFTERBUY_ORDERSTATUS', '0', '21', '5', NULL , '0000-00-00 00:00:00', 'xtc_get_order_status_name' , 'xtc_cfg_pull_down_order_statuses(');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'AFTERBUY_ACTIVATED', 'false', '21', '6', NULL , '0000-00-00 00:00:00', NULL , 'xtc_cfg_select_option(array(''true'', ''false''),');

INSERT INTO configuration_group VALUES ('20', 'Import/Export', 'Import/Export', '20', '1');
INSERT INTO configuration_group VALUES ('21', 'Afterbuy', 'Afterbuy.de', '21', '1'); 