Supertex Posted February 17, 2015 Share Posted February 17, 2015 I wanted a way for customers with a UPS account to complete their order without adding on any shipping costs. I already had 'Store Pickup" installed and working, so I tried to clone it to 'freight collect'. I've gone in and renamed the "spu" and "_SPU_" to "fr_collect" and "_FR_COLLECT_" throughout the file, renamed the module and english files accordingly, and it appears to have installed correctly. I can install and uninstall without affecting the original. However, when I run a transaction, and select the freight collect module, it just loops me back around to checkout_shipping. I've no idea what I might have missed. Anyone done this, or run into a similar scenario? Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
a.forever Posted February 24, 2015 Share Posted February 24, 2015 I wanted a way for customers with a UPS account to complete their order without adding on any shipping costs. I already had 'Store Pickup" installed and working, so I tried to clone it to 'freight collect'. I've gone in and renamed the "spu" and "_SPU_" to "fr_collect" and "_FR_COLLECT_" throughout the file, renamed the module and english files accordingly, and it appears to have installed correctly. I can install and uninstall without affecting the original. However, when I run a transaction, and select the freight collect module, it just loops me back around to checkout_shipping. I've no idea what I might have missed. Anyone done this, or run into a similar scenario? I feel game to figure this out, even though I don't check these boards as often as I once did. I assume you cloned this contribution: http://addons.oscommerce.com/info/164 I have an older version of that installed and did clone it a long time ago. There appears to be 5 instances of "spu" (including the $Id on line 3) and 21 instances of "_SPU_" that need to be changed. Personally I wouldn't use additional special characters or common words in the renaming process, so I'd opt for something like "frcoll" and "_FRCOLL_" and "frcoll.php" instead. Additionally this module has some kind of zone check, so ensure your cloned module settings and the shipping zone for your purchase allows the module to even activate properly. And if that doesn't work, you can compare to my cloned version of spu.php to vaspu.php (this is version 1.4 and I had commented out some of the zone checks to suit my store's needs): <?php /* $Id: vaspu.php,v 1.4 2002/11/10 14:29:56 mattice Exp $ CONTRIB is Store Pickup Shipping Module (http://www.oscommerce.com/community/contributions,164'>http://www.oscommerce.com/community/contributions,164) Based upon flat.php / vaspu.php by M. Halvorsen (http://www.arachnia-web.com) Made to work with latest check-out procedure by Matthijs (Mattice) >> e-mail: mattice@xs4all.nl >> site: http://www.matthijs.org TO TRANSLATE IN GERMAN !! osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License CHANGES: - formatted to work with latest checkout procedure - removed icon references - updated the db queries */ class vaspu { var $code, $title, $description, $icon, $enabled; // class constructor function vaspu() { global $order; $this->code = 'vaspu'; $this->title = MODULE_SHIPPING_VASPU_TEXT_TITLE; $this->description = MODULE_SHIPPING_VASPU_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_VASPU_SORT_ORDER; $this->icon = ''; $this->enabled = ((MODULE_SHIPPING_VASPU_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_VASPU_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id, zone_country_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_VASPU_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { // $check_flag = true; // break; // } elseif ($check['zone_id'] == $order->delivery['zone_id']) { } elseif ($check['zone_country_id'] == $order->delivery['country']['id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function quote($method = '') { global $order,$customer_id; $codep_query = tep_db_query("select c.configuration_value, ab.entry_postcode from " . TABLE_CONFIGURATION . " c, " . TABLE_ADDRESS_BOOK . " ab where c.configuration_key = 'MODULE_SHIPPING_VASPU_ZIP' and ab.customers_id = '" . (int)$customer_id . "'"); $codep = tep_db_fetch_array($codep_query); $dept_allow = split("[, ]", $codep['configuration_value']); $cust_cp = substr($codep['entry_postcode'], 0, 2); if((in_array($cust_cp, $dept_allow))||($codep['configuration_value'] == '')){ $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_VASPU_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_VASPU_TEXT_WAY, 'cost' => MODULE_SHIPPING_VASPU_COST))); return $this->quotes; }else{ return; } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_VASPU_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Store Pick Up', 'MODULE_SHIPPING_VASPU_STATUS', 'True', 'Do you want to offer Store Pickup?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Store Pickup Cost', 'MODULE_SHIPPING_VASPU_COST', '0.00', 'What is the pickup cost? (The Handling fee will NOT be added.)', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_VASPU_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Store Pick Up Zip Code Allowed', 'MODULE_SHIPPING_VASPU_ZIP', '01, 07, 26, 38, 42, 69, 74', 'Departement autorisé pour le retrait magasin ?', '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 ('Sort Order', 'MODULE_SHIPPING_VASPU_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } function keys() { return array('MODULE_SHIPPING_VASPU_STATUS', 'MODULE_SHIPPING_VASPU_COST', 'MODULE_SHIPPING_VASPU_SORT_ORDER', 'MODULE_SHIPPING_VASPU_ZONE', 'MODULE_SHIPPING_VASPU_ZIP'); } } ?> Quote Link to comment Share on other sites More sharing options...
Supertex Posted February 27, 2015 Author Share Posted February 27, 2015 @a.forever Thanks for the reply. I haven't posted back up to now, because I got hit by one of my manufacturers with the whole "you cant advertise our products that cheap" thing...so I've been neck-deep in a price obfuscation module install. I'll be back on this shortly. I dodn't want you to think I have no interest =P Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.