ce7 Posted March 21, 2019 Posted March 21, 2019 Hi, @raiwa I have BS frozen with few addons, installed Australian Shipping Module and it is working great, thank you! two questions need your help. Q1 in the front page, it will show up the handling fee and insurance fee, how can I not showing these two fee on the text area but only total? current example: AusPOST Express Post Parcel (Insured) $33 Delivery to 2000 - 1 days Estimated Delivery Time* 1 boxes 0.8kg(s) (incl $5.00 handling $5.00 insurance) wish example: AusPOST Express Post Parcel (Insured) $33 Delivery to 2000 - 1 days Estimated Delivery Time* 1 boxes 0.8kg(s) ---------------------------->not showing the handling fee nor the insurance Q2.Zone Rates No shipping available to the selected country zone module, the default i guess is iso_code_1, how can i change it for Australia zone? I guess because it is setting for us, so it doesn't show up now, how can i make it be able to use for Australia? (notice your code has this: $order->delivery['country']['iso_code_2'] == 'AU') Many thanks! Lyn
ce7 Posted March 22, 2019 Author Posted March 22, 2019 also i like to know if it is possible to have a shipping module that base on per kilo, is there a similar addon already there to adapt with? for example modify PER ITEM, instead of weight x per product, it is base on how far from dispatch location to destination, and the customer enter the estimate kilometer, eg: 150 km @ deleivery information (checkout_shipping.php) and the shipping price will be calculated as $0.1/per km x 150 km = $15 many thanks! Lyn
ce7 Posted March 22, 2019 Author Posted March 22, 2019 I found this addon (for osc 2.2 version) Shipping Zone Rates with SQL, which show the price base on the Australian post code, which is good, but have few problems: P1: it doesn't show up the sort order properly P2: when go to the checkout_confirmation.php page, the price show up as $0.00, (should be $106.8), it did add up with sub-total, but there is no option for add 10% tax for this shipping modules tried to modified the modules/shipping/tollzipzones.php but not working.... if the problems fix, what I like to do next step is instead of customer place order, the order/shopping cart details will be sent by email to the shop owner, and the owner check the list and grant permission for the order, not sure any addon do this function? any suggestion? Many thanks! Lyn
♥raiwa Posted March 22, 2019 Posted March 22, 2019 Hello Lyn @ce7, I'm sorry, but I'm not the author/maintainer of these shipping modules. I only updated them some time ago for BS and PHP7 compatibility. Please post your questions in the official support thread: https://www.oscommerce.com/forums/topic/398158-contribution-new-australia-post-shipping-modules-for-osc-23x/?page=4&tab=comments#comment-1767702 THe other generic questions should be posted in the general shipping modules thread. I just had a fast look and for Q1 you should remove the additional info around these lines: if ($insurance == '' && $handling == 0) { $auspost_addons = "(" . $method_service . ")"; } else { $auspost_addons = "(" . MODULE_SHIPPING_AUSPOST_DOM_COUR_TEXT_INCLUDE . $handling_details . ($handling > 0 && ($insurance != '' || $signature != '') ? MODULE_SHIPPING_AUSPOST_DOM_COUR_TEXT_PLUS : ':') . $signature_details . ($signature != '' && $insurance != '' ? MODULE_SHIPPING_AUSPOST_DOM_COUR_TEXT_PLUS : '') . $insurance_details . ")"; } $shipping_auspost_method = $auspost_addons; Best regards Rainer About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
stefan1959 Posted August 3, 2019 Posted August 3, 2019 FYI: (I've just installed CE version and need the Australian shipping.) There is 2 modules. The Australian Shipping Module (BS compatible) and NEW Australia Post Shipping Modules (non-BS) . Original message was about the first module, the forum you pointed to is for the second module. I install the first module and works fine on CE 1.0.1.0 but missing the express satchel. I think I can convert a flat rate to do the job as I can't find anything to do the job. Steve
stefan1959 Posted August 4, 2019 Posted August 4, 2019 BTW I found I fixed alot of issues with these old modules on CE 1.0.1.0 buy adding to the languages file of the module, 2 lines define('TABLE_CONFIGURATION' , 'configuration'); define('TABLE_ZONES_TO_GEO_ZONES' , 'zones_to_geo_zones'); due to the fact there is no longer defined anywhere. Steve
♥raiwa Posted August 4, 2019 Posted August 4, 2019 You'd better update all instances of TABLE_CONFIGURATION and TABLE_ZONES_TO_GEO_ZONES to real table names " configuration " and " zones_to_geo_zones" in all queries in the module. That's what is done in all other module updates for Phoenix and previous EDGE versions since the table constants have been removed years ago. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
stefan1959 Posted August 4, 2019 Posted August 4, 2019 Yeah I was doing that, but I thought it was easier just adding the 2 define lines, and I'm only using it on one site not distributing it. I wish the authors of there modules would maintain them better as they know the code better, and CE is really a must now. Steve
♥raiwa Posted August 4, 2019 Posted August 4, 2019 If you already updated and it works, you could upload your version. Who knows if the original author is still around here 😉 About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
SCH_001 Posted August 5, 2019 Posted August 5, 2019 Hi @stefan1959 What I did was use the flat rate shipping module and hacked it not sure if the code is 100% but works for me. It has the minimum and maximum weight which is where this module is shown and also shipping zone so you can setup international shipping. I have created multiple versions of it for 500g parcel post and then 3 kg parcel post and so on.... I would only used the mysql part of that file to give me the zones File below goes in /store/includes/modules/shipping and is called parcelsm.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class parcelsm { var $code, $title, $description, $icon, $enabled; // class constructor function __construct() { global $order, $total_weight; $this->code = 'parcelsm'; $this->title = MODULE_SHIPPING_PARCELSM_TEXT_TITLE; $this->description = MODULE_SHIPPING_PARCELSM_TEXT_DESCRIPTION; if ( defined('MODULE_SHIPPING_PARCELSM_STATUS') ) { $this->sort_order = MODULE_SHIPPING_PARCELSM_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_PARCELSM_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_PARCELSM_STATUS == 'True') ? true : false); } if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_PARCELSM_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_PARCELSM_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']) { $check_flag = true; break; } } if ($total_weight > MODULE_SHIPPING_PARCELSM_MAX_WEIGHT or $total_weight < MODULE_SHIPPING_PARCELSM_MIN_WEIGHT) { $check_flag = false; } if ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $order; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_PARCELSM_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_PARCELSM_TEXT_WAY, 'cost' => MODULE_SHIPPING_PARCELSM_COST))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, htmlspecialchars($this->title)); return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_PARCELSM_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 Parcel Post 500g Shipping', 'MODULE_SHIPPING_PARCELSM_STATUS', 'True', 'Do you want to offer parcel post 500g shipping?', '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 ('Shipping Cost', 'MODULE_SHIPPING_PARCELSM_COST', '5.00', 'The shipping cost for all orders using 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, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_PARCELSM_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', 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_PARCELSM_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 ('Minimum Weight (Kgs)', 'MODULE_SHIPPING_PARCELSM_MIN_WEIGHT', '0.1', 'Minimum weight (Kgs) that can be shipped with this method. This method will not be displayed if shipping weight is below it.', '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 ('Maximum Weight (Kgs)', 'MODULE_SHIPPING_PARCELSM_MAX_WEIGHT', '0.1', 'Maximum weight (Kgs) that can be shipped with this method. This method will not be displayed if shipping weight is above it.', '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_PARCELSM_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_SHIPPING_PARCELSM_STATUS', 'MODULE_SHIPPING_PARCELSM_COST', 'MODULE_SHIPPING_PARCELSM_TAX_CLASS', 'MODULE_SHIPPING_PARCELSM_ZONE', 'MODULE_SHIPPING_PARCELSM_MIN_WEIGHT','MODULE_SHIPPING_PARCELSM_MAX_WEIGHT', 'MODULE_SHIPPING_PARCELSM_SORT_ORDER'); } } ?> And this one goes in /store/includes/languages/english/modules/shipping and is called parcelsm.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('MODULE_SHIPPING_PARCELSM_TEXT_TITLE', 'Parcel Post 500g with tracking'); define('MODULE_SHIPPING_PARCELSM_TEXT_DESCRIPTION', 'Parcel Post 500g'); define('MODULE_SHIPPING_PARCELSM_TEXT_WAY', ''); ?> Then if you want more options with different weight you copy the files to a new name and change all the PARCELSM to a new name like PARCELMED for 3kg parcel post I also found it very worth while changing the weight in osc to 3 decimal places that way you can use actual weights of items .150 Anyway hope this helps
stefan1959 Posted August 5, 2019 Posted August 5, 2019 Thanks, I have got all shipping methods for satchel converted over but the above could be useful in the future. I might fix coding and contact author as well to update. Thanks Steve screenshot below
stefan1959 Posted August 5, 2019 Posted August 5, 2019 P.S. You maybe still on the normal Oscommerce, I'm converting over Community Edition. The code.. ("insert into " . TABLE_CONFIGURATION . " (configuration_title will cause a error as the /includes/database_tables.php file has been deprecated and was causing me headaches Thats why I did a workaround and defined in the languages file of the module define('TABLE_CONFIGURATION' , 'configuration'); define('TABLE_ZONES_TO_GEO_ZONES' , 'zones_to_geo_zones'); Bingo errors went away. But it should be really hardcode in the source code like this ("insert into configuration (configuration_title Steve
SCH_001 Posted August 5, 2019 Posted August 5, 2019 @stefan1959 Running Frozen CE boot strap and I don't see any errors and all works ok I guess you are working on Phoenix? This was released after I finished doing all the mods and after this version went live Store pickup and local courier will only show if their postcode starts with a 5
stefan1959 Posted August 5, 2019 Posted August 5, 2019 Ok, i had a look at the donwloads for Frozen CE boot strap and can't find, where is this hidden? Steve
SCH_001 Posted August 6, 2019 Posted August 6, 2019 Looks like the links to it have now been removed.... If you still want it click on the link below as it's too large to attach here https://www.dropbox.com/s/oov2ghu0deioryt/Responsive-osCommerce-2341-Frozen.zip?dl=0
SCH_001 Posted August 6, 2019 Posted August 6, 2019 But I think if you are doing a new install that you should be using Phoenix
Recommended Posts
Archived
This topic is now archived and is closed to further replies.