souzadavi Posted March 3, 2004 Share Posted March 3, 2004 I?m trying to use this contribuition for shipping, but i think that contribuition it?s to old, and i?m trying to fixe this to use on the new version of oscommerce 2.2.... so, someone can help me to start? I was trying to read something about the new structure of shipping modules, but the documentation it?s about the old version..... the source is below.... thanks <?php /* $Id: sedex.php,v 1.1 2002/06/01 12:10:17 jcm Exp $ The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2000,2001 The Exchange Project Released under the GNU General Public License */ class SEDEX { var $code, $title, $description, $icon, $enabled; // class constructor function SEDEX() { $this->code = 'SEDEX'; $this->title = MODULE_SHIPPING_SEDEX_TEXT_TITLE; $this->description = MODULE_SHIPPING_SEDEX_TEXT_DESCRIPTION; $this->icon = ''; $this->enabled = MODULE_SHIPPING_SEDEX_STATUS; } // class methods function selection() { $selection_string = '<table border="0" cellspacing="0" cellpadding="0" width="100%">' . "\n" . ' <tr>' . "\n" . ' <td class="main"> ' . (($this->icon) ? tep_image($this->icon, $this->title) : '') . ' ' . MODULE_SHIPPING_SEDEX_TEXT_TITLE . ' </td>' . "\n" . ' <td align="right" class="main"> ' . tep_draw_checkbox_field('shipping_quote_sedex', '1', true) . ' </td>' . "\n" . ' </tr>' . "\n" . '</table>' . "\n"; return $selection_string; } function quote() { global $cart, $shipping_quoted, $address_values, $shipping_weight, $shipping_sedex_cost, $shipping_sedex_method; if ( ($GLOBALS['shipping_quote_all'] == '1') || ($GLOBALS['shipping_quote_sedex'] == '1') ) { $shipping_quoted = 'sedex'; $zone1 = array('153'); $zone2 = array('142', '145', '147', '152'); $zone3 = array('137', '141'); $zone4 = array('149'); $zone5 = array('138'); $zone6 = array('134', '140', '155'); $zone7 = array('131', '154'); $zone8 = array('144', '146', '150', '156'); $zone9 = array('130', '132', '133', '135', '139', '143', '148'); $zone10 = array('151'); $zone12 = array('168', '172', '174', '179'); $zone13 = array('136','163', '167'); $zone14 = array('176'); $zone15 = array('164'); $zone16 = array('161', '166', '181'); $zone17 = array('158', '180'); $zone18 = array('170', '171', '173', '177'); $zone19 = array('157', '159', '160', '162', '165', '169', '175'); $zone20 = array('178'); if (in_array($address_values['zone_id'], $zone1)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone1'); } if (in_array($address_values['zone_id'], $zone2)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone2'); } if (in_array($address_values['zone_id'], $zone3)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone3'); } if (in_array($address_values['zone_id'], $zone4)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone4'); } if (in_array($address_values['zone_id'], $zone5)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone5'); } if (in_array($address_values['zone_id'], $zone6)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone6'); } if (in_array($address_values['zone_id'], $zone7)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone7'); } if (in_array($address_values['zone_id'], $zone8)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone8'); } if (in_array($address_values['zone_id'], $zone9)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone9'); } if (in_array($address_values['zone_id'], $zone10)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone10'); } if (in_array($address_values['zone_id'], $zone12)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone12'); } if (in_array($address_values['zone_id'], $zone13)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone13'); } if (in_array($address_values['zone_id'], $zone14)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone14'); } if (in_array($address_values['zone_id'], $zone15)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone15'); } if (in_array($address_values['zone_id'], $zone16)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone16'); } if (in_array($address_values['zone_id'], $zone17)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone17'); } if (in_array($address_values['zone_id'], $zone18)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone18'); } if (in_array($address_values['zone_id'], $zone19)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone19'); } if (in_array($address_values['zone_id'], $zone20)) { $sedex_cost = constant('MODULE_SHIPPING_SEDEX_zone20'); } $sedex_table = split("[:,]" , $sedex_cost); for ($i = 0; $i < count($sedex_table); $i+=2) { if ($shipping_weight <= $sedex_table[$i]) { $shipping = $sedex_table[$i+1]; $shipping_sedex_method = $shipping_weight .' '. MODULE_SHIPPING_SEDEX_TEXT_UNITS . ' (' . MODULE_SHIPPING_SEDEX_TEXT_WAY . ')'; break; } } $shipping_sedex_cost = ($shipping + MODULE_SHIPPING_SEDEX_HANDLING); } } function cheapest() { global $shipping_count, $shipping_cheapest, $shipping_cheapest_cost, $shipping_sedex_cost; if ( ($GLOBALS['shipping_quote_all'] == '1') || ($GLOBALS['shipping_quote_sedex'] == '1') ) { if ($shipping_count == 0) { $shipping_cheapest = 'sedex'; $shipping_cheapest_cost = $shipping_sedex_cost; } else { if ($shipping_sedex_cost < $shipping_cheapest_cost) { $shipping_cheapest = 'sedex'; $shipping_cheapest_cost = $shipping_sedex_cost; } } $shipping_count++; } } function display() { global $HTTP_GET_VARS, $currencies, $shipping_cheapest, $shipping_sedex_method, $shipping_sedex_cost, $shipping_selected; // set a global for the radio field (auto select cheapest shipping method) if (!$HTTP_GET_VARS['shipping_selected']) $shipping_selected = $shipping_cheapest; if ( ($GLOBALS['shipping_quote_all'] == '1') || ($GLOBALS['shipping_quote_sedex'] == '1') ) { $display_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">' . "\n" . ' <tr>' . "\n" . ' <td class="main"> ' . (($this->icon) ? tep_image($this->icon, $this->title) : '') . ' ' . MODULE_SHIPPING_SEDEX_TEXT_TITLE . ' <small><i>(' . $shipping_sedex_method . ')</i></small> </td>' . "\n" . ' <td align="right" class="main"> ' . $currencies->format($shipping_sedex_cost); if (tep_count_shipping_modules() > 1) { $display_string .= ' ' . tep_draw_radio_field('shipping_selected', 'sedex') . tep_draw_hidden_field('shipping_sedex_cost', $shipping_sedex_cost) . tep_draw_hidden_field('shipping_sedex_method', $shipping_sedex_method) . ' </td>' . "\n"; } else { $display_string .= ' ' . tep_draw_hidden_field('shipping_selected', 'sedex') . tep_draw_hidden_field('shipping_sedex_cost', $shipping_sedex_cost) . tep_draw_hidden_field('shipping_sedex_method', $shipping_sedex_method) . ' </td>' . "\n"; } $display_string .= ' </tr>' . "\n" . '</table>' . "\n"; } return $display_string; } function confirm() { global $HTTP_POST_VARS, $shipping_cost, $shipping_method; if ($HTTP_POST_VARS['shipping_selected'] == 'sedex') { $shipping_cost = $HTTP_POST_VARS['shipping_sedex_cost']; $shipping_method = $HTTP_POST_VARS['shipping_sedex_method']; } } function check() { $check = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_STATUS'"); $check = tep_db_num_rows($check); return $check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Enable Sedex', 'MODULE_SHIPPING_SEDEX_STATUS', '1', 'Do you want to offer Sedex ?', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('SP', 'MODULE_SHIPPING_SEDEX_zone1', '1:8.1,2:9.2,3:10.3,4:10.8,5:11.9,6:12.9,7:14,8:15.1,9:16.1,10:17.2,11:18.3, 12:19.3,13:20.4,14:21.5,15:22.5,16:23.6,17:24.7,18:25.7,19:26.8,20:27.9,21:2 8.9,22:30,23:31.1,24:32.1,25:33.2,26:34.3,27:35.3,28:36.4,29:37.5,30:38.5', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MG, PR, RJ, SC', 'MODULE_SHIPPING_SEDEX_zone2', '1:17.2,2:22.1,3:27,4:29.5,5:34.4,6:39.4,7:44.3,8:49.3,9:54.2,10:59.1,11:64. 1,12:69,13:74,14:78.9,15:83.8,16:88.8,17:93.7,18:98.6,19:103.6,20:108.5,21:1 13.5,22:118.4,23:123.3,24:128.3,25:133.2,26:138.1,27:143.1,28:148,29:153,30: 157.9', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DF, ES, MS', 'MODULE_SHIPPING_SEDEX_zone3', '1:19.1,2:24.8,3:30.5,4:33.3,5:39,6:44.7,7:50.4,8:56.1,9:61.8,10:67.5,11:73. 2,12:78.9,13:84.6,14:90.3,15:96,16:101.7,17:107.4,18:113.1,19:118.8,20:124.5 ,21:130.2,22:135.9,23:141.6,24:147.3,25:153,26:158.7,27:164.4,28:170.1,29:17 5.8,30:181.5', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('RS', 'MODULE_SHIPPING_SEDEX_zone4', '1:20.1,2:26.3,3:32.3,4:35.4,5:41.4,6:47.5,7:53.5,8:59.6,9:65.6,10:71.7,11:7 7.7,12:83.8,13:89.8,14:95.9,15:101.9,16:108,17:114,18:120.1,19:126.1,20:132. 2,21:138.2,22:144.3,23:150.3,24:156.4,25:162.4,26:168.5,27:174.5,28:180.6,29 :186.6,30:192.7', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('GO', 'MODULE_SHIPPING_SEDEX_zone5', '1:23,2:30,3:37,4:40.5,5:47.4,6:54.4,7:61.4,8:68.4,9:75.3,10:82.3,11:89.3,12 :96.3,13:103.3,14:110.2,15:117.2,16:124.2,17:131.2,18:138.1,19:145.1,20:152. 1,21:159.1,22:166,23:173,24:180,25:187,26:194,27:200.9,28:207.9,29:214.9,30: 221.9', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('BA, MT TO', 'MODULE_SHIPPING_SEDEX_zone6', '1:23.7,2:31,3:38,4:42,5:49.4,6:56.7,7:64,8:71.3,9:78.7,10:86,11:93.3,12:100 .6,13:100.8,14:115.8,15:122.6,16:129.9,17:137.3,18:144.6,19:151.9,20:159.2,2 1:166.6,22:173.9,23:181.2,24:188.5,25:195.9,26:203.2,27:210.5,28:217.8,29:22 5.2,30:232.5', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('AL, SE', 'MODULE_SHIPPING_SEDEX_zone7', '1:26,2:34.3,3:42.3,4:46.4,5:54.5,6:62.7,7:70.8,8:79,9:87.1,10:95.2,11:103.4 ,12:111.5,13:119.7,14:127.8,15:135.9,16:144.2,17:152.2,18:160.3,19:168.5,20: 176.6,21:184.8,22:173.9,23:181.2,24:209.2,25:217.3,26:225.5,27:233.6,28:241. 7,29:249.9,30:258', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('PB, PE, PI, RO', 'MODULE_SHIPPING_SEDEX_zone8', '1:29.4,2:39,3:48.5,4:53.3,5:62.8,6:72.3,7:81.9,8:91.4,9:100.9,10:110.5,11:1 20,12:129.5,13:139.1,14:148.6,15:158.1,16:167.7,17:177.2,18:186.7,19:196.3,2 0:205.8,21:215.3,22:224.9,23:234.4,24:244,25:253.5,26:263,27:272.6,28:282.1, 29:291.6,30:301.2', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('AC, AP, AM, CE, MA, PA, RN', 'MODULE_SHIPPING_SEDEX_zone9', '1:32.6,2:43.3,3:54,4:59.3,5:70,6:80.7,7:91.4,8:102.1,9:112.8,10:123.5,11:13 4.2,12:144.9,13:155.6,14:166.3,15:177,16:187.7,17:198.4,18:209.4,19:219.8,20 :230.5,21:241.2,22:251.9,23:262.6,24:273.3,25:284,26:294.7,27:305.3,28:316,2 9:326.7,30:337.4', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('RR', 'MODULE_SHIPPING_SEDEX_zone10', '1:36.6,2:48.5,3:60.3,4:66.3,5:78.1,6:90,7:101.9,8:113.7,9:125.6,10:137.4,11 :149.3,12:161.2,13:173,14:184.9,15:196.7,16:208.6,17:220.5,18:232.3,19:244.2 ,20:256,21:267.9,22:279.8,23:291.6,24:303.5,25:315.3,26:327.2,27:339.1,28:35 0.9,29:362.8,30:374.7', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capitais: MG, PR, RJ, SC', 'MODULE_SHIPPING_SEDEX_zone12', '1:11.2,2:13.8,3:16.4,4:17.7,5:20.3,6:22.9,7:25.5,8:28.1,9:30.7,10:33.3,11:3 5.9,12:38.5,13:41,14:31.6,15:46.2,16:48.8,17:51.4,18:54,19:56.6,20:59.2,21:6 1.8,22:64.4,23:67,24:69.6,25:72.2,26:74.8,27:77.3,28:79.9,29:82.5,30:85.1', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capitais: DF, ES, MS', 'MODULE_SHIPPING_SEDEX_zone13', '1:14.7,2:18.7,3:22.8,4:24.8,5:28.9,6:33,7:37,8:41.1,9:45.2,10:49.2,11:53.3, 12:57.4,13:61.5,14:65.5,15:69.6,16:73.7,17:77.7,18:81.8,19:85.9,20:89.9,21:9 4,22:98.1,23:102.2,24:106.2,25:110.3,26:114.4,27:118.4,28:122.5,29:126.6,30: 130.6', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capital RS', 'MODULE_SHIPPING_SEDEX_zone14', '1:15.6,2:19.9,3:24.2,4:26.4,5:30.7,6:35,7:39.3,8:43.6,9:48,10:52.3,11:56.6, 12:60.9,13:65.2,14:69.6,15:73.9,16:78.2,17:82.5,18:86.9,19:91.2,20:95.5,21:9 9.8,22:104.1,23:108.5,24:112.8,25:117.1,26:121.4,27:125.7,28:130.1,29:134.4, 30:138.7', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capital GO', 'MODULE_SHIPPING_SEDEX_zone15', '1:17.8,2:22.9,3:28,4:30.6,5:35.7,6:40.8,7:45.9,8:51,9:56.2,10:61.3,11:66.4, 12:71.5,13:76.6,14:81.7,15:86.9,16:92,17:97.1,18:102.2,19:107.3,20:112.4,21: 117.6,22:122.7,23:127.8,24:132.9,25:138,26:143.1,27:148.3,28:153.4,29:158.5, 30:163.6', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capitais: BA, MT TO', 'MODULE_SHIPPING_SEDEX_zone16', '1:19.5,2:25.2,3:30.9,4:33.8,5:39.5,6:45.2,7:50.9,8:56.6,9:62.3,10:68,11:73. 7,12:79.4,13:85.1,14:90.8,15:96.5,16:102.2,17:107.8,18:113.5,19:119.2,20:124 .9,21:130.6,22:136.3,23:142,24:147.7,25:153.4,26:159.1,27:164.8,28:170.5,29: 176.2,30:181.9', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capitais: AL, SE', 'MODULE_SHIPPING_SEDEX_zone17', '1:21.7,2:28.3,3:34.8,4:38,5:44.5,6:51,7:57.6,8:64.1,9:70.6,10:77.1,11:83.6, 12:90.1,13:96.6,14:103.1,15:109.7,16:116.2,17:122.7,18:129.2,19:135.7,20:142 .2,21:148.7,22:155.2,23:161.7,24:168.3,25:174.8,26:181.3,27:187.8,28:194.3,2 9:200.8,30:207.3', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capitais: PB, PE, PI, RO', 'MODULE_SHIPPING_SEDEX_zone18', '1:24.9,2:32.8,3:40.7,4:44.7,5:52.6,6:60.5,7:68.4,8:76.3,9:84.2,10:92.1,11:1 00,12:107.9,13:115.8,14:123.7,15:131.6,16:139.5,17:147.4,18:155.3,19:163.3,2 0:171.2,21:179.1,22:187,23:194.9,24:202.8,25:210.7,26:218.6,27:226.5,28:234. 4,29:242.3,30:250.2', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capitais: AC, AP, AM, CE, MA, PA, RN', 'MODULE_SHIPPING_SEDEX_zone19', '1:28.5,2:37.6,3:46.6,4:51.2,5:60.2,6:69.3,7:78.4,8:87.4,9:96.5,10:105.6,11: 114.7,12:123.7,13:132.8,14:141.9,15:150.9,16:160,17:169.1,18:178.1,19:187.2, 20:196.3,21:205.3,22:214.4,23:223.5,24:232.6,25:241.6,26:250.7,27:259.8,28:2 68.8,29:277.9,30:287', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Capital: RR', 'MODULE_SHIPPING_SEDEX_zone20', '1:32.2,2:42.6,3:52.9,4:58.1,5:68.4,6:78.8,7:89.1,8:99.5,9:109.8,10:120.2,11 :130.5,12:140.9,13:151.2,14:161.6,15:171.9,16:182.3,17:192.6,18:203,19:213.3 ,20:223.7,21:234,22:244.4,23:254.7,24:265.1,25:275.4,26:285.8,27:296.1,28:30 6.5,29:316.8,30:327.2', 'Shipping based on weight of products. Example: 1:3.50,2:5.50,etc.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_SEDEX_HANDLING', '0', 'Handling Fee for this shipping method', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Location', 'MODULE_SHIPPING_SEDEX_STORE_PROVINCE', '153', 'Location code of the shop', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_STATUS'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone1'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone2'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone3'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone4'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone5'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone6'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone7'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone8'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone9'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone10'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone12'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone13'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone14'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone15'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone16'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone17'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone18'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone19'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_zone20'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_HANDLING'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SEDEX_STORE_PROVINCE'"); } function keys() { $keys = array('MODULE_SHIPPING_SEDEX_STATUS', 'MODULE_SHIPPING_SEDEX_zone1', 'MODULE_SHIPPING_SEDEX_zone2', 'MODULE_SHIPPING_SEDEX_zone3', 'MODULE_SHIPPING_SEDEX_zone4', 'MODULE_SHIPPING_SEDEX_zone5', 'MODULE_SHIPPING_SEDEX_zone6', 'MODULE_SHIPPING_SEDEX_zone7', 'MODULE_SHIPPING_SEDEX_zone8', 'MODULE_SHIPPING_SEDEX_zone9', 'MODULE_SHIPPING_SEDEX_zone10', 'MODULE_SHIPPING_SEDEX_zone12', 'MODULE_SHIPPING_SEDEX_zone13', 'MODULE_SHIPPING_SEDEX_zone14', 'MODULE_SHIPPING_SEDEX_zone15', 'MODULE_SHIPPING_SEDEX_zone16', 'MODULE_SHIPPING_SEDEX_zone17', 'MODULE_SHIPPING_SEDEX_zone18', 'MODULE_SHIPPING_SEDEX_zone19', 'MODULE_SHIPPING_SEDEX_zone20', 'MODULE_SHIPPING_SEDEX_HANDLING', 'MODULE_SHIPPING_SEDEX_STORE_PROVINCE'); return $keys; } } ?> Davi S Souza Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.