[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 # This SQL script upgrades the core Zen Cart database structure from v1.2.3 to v1.2.4 2 # 3 # $Id: mysql_upgrade_zencart_123_to_124.sql 4243 2006-08-24 10:55:28Z drbyte $ 4 # 5 ## CONFIGURATION TABLE 6 INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Manufacturers List - Verify Product Exist', 'PRODUCTS_MANUFACTURERS_STATUS', '1', 'Verify that at least 1 product exists and is active for the manufacturer name to show<br /><br />Note: When this feature is ON it can produce slower results on sites with a large number of products and/or manufacturers<br />0= off 1= on', 3, 7, 'zen_cfg_select_option(array(\'0\', \'1\'), ', now()); 7 INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Image - Use Proportional Images on Products and Categories', 'PROPORTIONAL_IMAGES_STATUS', '1', 'Use Proportional Images on Products and Categories?<br /><br />NOTE: Do not use 0 height or width settings for Proportion Images<br />0= off 1= on', 4, 75, 'zen_cfg_select_option(array(\'0\', \'1\'), ', now()); 8 INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Show Shopping Cart - Update Cart Button Location', 'SHOW_SHOPPING_CART_UPDATE', '3', 'Show on Shopping Cart Update Cart Button Location as:<br /><br />1= Next to each Qty Box<br />2= Below all Products<br />3= Both Next to each Qty Box and Below all Products<br /><br />Note: this setting controls which of 3 tpl_shopping_cart_default files are called', '9', '22', 'zen_cfg_select_option(array(\'1\', \'2\', \'3\'), ', now()); 9 INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Read Only option type - Ignore for Add to Cart', 'PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED', '1', 'When a Product only uses READONLY attributes, should the Add to Cart button be On or Off?<br />0= OFF<br />1= ON', '13', '37', 'zen_cfg_select_option(array(\'0\', \'1\'), ', now()); 10 INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Also Purchased Products Columns per Row', 'SHOW_PRODUCT_INFO_COLUMNS_ALSO_PURCHASED_PRODUCTS', '3', 'Also Purchased Products Columns per Row<br />0= off or set the sort order', '18', '72', 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\', \'4\'), ', now()); 11 ALTER TABLE project_version_history DROP COLUMN project_version_ip_address; 12 13 # This step was missed in the 1.2.3 upgrade when it was first released. 14 ALTER TABLE paypal CHANGE COLUMN payment_date payment_date datetime NOT NULL default '0001-01-01 00:00:00'; 15 ALTER TABLE paypal CHANGE COLUMN zen_order_id zen_order_id int(11) unsigned NOT NULL default '0'; 16 17 ########################################################################################### 18 ################## THE FOLLOWING LINE LAYOUT IS IMPORTANT ... the SELECT and FROM and WHERE words must start the beginning of these lines 19 20 #The following deletes the duplicate EMAIL_TRANSPORT entries in the configuration table created by the 1.2.3 upgrade script: 21 #NEXT_X_ROWS_AS_ONE_COMMAND:5 22 SET @t1=0; 23 SELECT (@t1:=configuration_id) as t1 24 FROM configuration 25 WHERE configuration_key = 'EMAIL_TRANSPORT' limit 1; 26 DELETE FROM configuration where configuration_key = 'EMAIL_TRANSPORT' and configuration_id > @t1; 27 28 ## The following deletes the duplicate MODULE_ORDER_TOTAL_COUPON_INC_TAX entry created by the 1.2.3 upgrade 29 #NEXT_X_ROWS_AS_ONE_COMMAND:5 30 SET @t1=0; 31 SELECT (@t1:=configuration_id) as t1 32 FROM configuration 33 WHERE configuration_key = 'MODULE_ORDER_TOTAL_COUPON_INC_TAX' limit 1; 34 DELETE FROM configuration where configuration_key = 'MODULE_ORDER_TOTAL_COUPON_INC_TAX' and configuration_id > @t1; 35 36 ## The following deletes the duplicate MODULE_ORDER_TOTAL_GV_INC_TAX entry created by the 1.2.3 upgrade 37 #NEXT_X_ROWS_AS_ONE_COMMAND:5 38 SET @t1=0; 39 SELECT (@t1:=configuration_id) as t1 40 FROM configuration 41 WHERE configuration_key = 'MODULE_ORDER_TOTAL_GV_INC_TAX' limit 1; 42 DELETE FROM configuration where configuration_key = 'MODULE_ORDER_TOTAL_GV_INC_TAX' and configuration_id > @t1; 43 44 ## The following deletes the duplicate SHOW_SHOPPING_CART_DELETE entry created by the 1.2.3 upgrade 45 #NEXT_X_ROWS_AS_ONE_COMMAND:5 46 SET @t1=0; 47 SELECT (@t1:=configuration_id) as t1 48 FROM configuration 49 WHERE configuration_key = 'SHOW_SHOPPING_CART_DELETE' limit 1; 50 DELETE FROM configuration where configuration_key = 'SHOW_SHOPPING_CART_DELETE' and configuration_id > @t1; 51 52 ############# 53 54 #### VERSION UPDATE COMMANDS 55 ## THE FOLLOWING 2 SECTIONS SHOULD BE THE "LAST" ITEMS IN THE FILE, so that if the upgrade fails prematurely, the version info is not updated. 56 ##The following updates the version HISTORY to store the prior version's info (Essentially "moves" the prior version info from the "project_version" to "project_version_history" table 57 #NEXT_X_ROWS_AS_ONE_COMMAND:3 58 INSERT INTO project_version_history (project_version_key, project_version_major, project_version_minor, project_version_patch, project_version_date_applied, project_version_comment) 59 SELECT project_version_key, project_version_major, project_version_minor, project_version_patch1 as project_version_patch, project_version_date_applied, project_version_comment 60 FROM project_version; 61 62 ## Now set to new version 63 UPDATE project_version SET project_version_major='1', project_version_minor='2.4', project_version_patch1='', project_version_patch1_source='', project_version_patch2='', project_version_patch2_source='', project_version_comment='Version Update 1.2.3->1.2.4', project_version_date_applied=now() WHERE project_version_key = 'Zen-Cart Main'; 64 UPDATE project_version SET project_version_major='1', project_version_minor='2.4', project_version_patch1='', project_version_patch1_source='', project_version_patch2='', project_version_patch2_source='', project_version_comment='Version Update 1.2.3->1.2.4', project_version_date_applied=now() WHERE project_version_key = 'Zen-Cart Database'; 65 66 67 ##### END OF UPGRADE SCRIPT
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |