Guest Posted January 9, 2006 Share Posted January 9, 2006 Can anyone help me with a Fastways Shipping Module for Australia? Is there some way to modify another one that is Postcode based? Thanks so much Quote Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2006 Share Posted January 20, 2006 Hi Theresa, Facing a similar issue as you - with time running out fast. Site is for wife's new business, so it needed to be up like last month. (I'm no coding monkey and have been avoiding learning anything about SQL....till now) Unable to afford to outsource to someone who charges a fortune even for a basic site, this has got to be done by me :( I modified the Toll/TNT modules (after checking both oscommerce-2.2ms2-051113 and osCLoadedAUpr3 for a Fastways solution) but have stumbled into a couple of issues.... I received a softcopy of their rates in excel and added it to my database (via excel -> ConTEXT (in SQL debug mode) -> phpMyAdmin. For future mod to be applied later on, I thought I would include the expected delivery time row - so it can be added as output when you request the quote - just like AusPost does. Hey, we all want to know when it's due to arrive! The rate codes prices are defined in another table for easy modification, and are reffered in the zone table by the letter rate code. Toll only has approx 8000 unique shipping rates based on unique postcodes (nice and easy), however after I imported the Fastways rates into a database table, they have over 12000 rates, due to some places with the same postcode being charged a different rate. When a customer goes to checkout, the database only looks for the first postcode the same as the customer has advised for their shipping location it can find (regardless of location), and advises the charges accordingly. A prime example of this is Orange NSW 2800. LUCKNOW 2800 G 3-7 DAYS MARCH 2800 G 3-7 DAYS MULLION CREEK 2800 G 3-7 DAYS NASHDALE 2800 G 3-7 DAYS OPHIR 2800 G 3-7 DAYS ORAN PARK 2800 P/L NEXT DAY ORANGE 2800 P NEXT DAY PANUARA 2800 G 3-7 DAYS PINNACLE 2800 G 3-7 DAYS From Sydney, they have just been included in the (P) $8.75+GST shorthaul rate. However, as per above, the DB would first find another location (there are actually 31 locations with 2800 as the postcode - of which, there is 3 different rate codes), so your customer would be charged (G) $22.25+GST. rather than the correct amount of (P) $8.75+GST I called them regarding their charges for Orange also to confirm their so many different rates for that area, and eventhough the suburb Glenroi is in Orange, they would still charge (G) $22.25+GST if the customer specified Glenroi. So for this instance, I think it best to confirm the rate charges for the customer at times and manually refund them, or advise them of extra charges due to Fastways complex non friendly shipping rates. Makes your site look a bit unprofessional though if you have to add a disclaimer on the checkout page that although your about to make a payment, there maybe changes to what we've charged you :( Due to the above postcode option, it's the same reason why we can't go by suburb/town name..... ACTON 2601 R 1 DAY ACTON 6532 W 4-9 DAYS Huge different in rates and delivery time (since there on either side of the country) I think it would be better if it gave them either a more refined search by searching the postcode, then suburb/town and showing the single result, OR show all the variable locations of that postcode (and prices) - although 31 is an awful lot to display if the postcode was 2800, and have the customer wade through, HOWEVER, you have given the customer the ultimate choice to choose what they are going to be charged as they have advised the destination, and the shipping rate, rather than a possible incorrect amount being advised by your database and have you trying to chase extra charges Fastways have charged you, or the other extent of you appoligising and refunding the customer. Both of which may cause future lost sales though due to bad shipping quotations, or missed sale as the customer would look at it and say their not paying that amount for shipping and go elsewhere. So, anyone have any code suggestions before I scap this and just tell the wife the customers will have to use AusPost as opposed to Fastways who's price includes insurance for loss and the goods are trackable?? :) Here is the snippet I've modified (It's just austntshipping2 really) I have changed the excess freight charge to 5kg only though as we will not be shipping anything heavier. This can be an issue for some as for local and shorthaul you can have up to 25kg before excess charges apply - something to modify one day I suppose. I'm willing to package my code and add it as a contribute. However after hitting these bugs, these really need to be fixed before you can call it a contribution...... So, with some help of the community if this gets resolved, we can release it .\includes\modules\shipping <?php /* Released under the GNU General Public License */ class fastzipzones { var $code, $title, $description, $enabled, $num_zones, $surcharge_factor; // class constructor:w function fastzipzones() { $this->code = 'fastzipzones'; $this->title = MODULE_SHIPPING_FASTZIPZONES_TEXT_TITLE; $this->description = MODULE_SHIPPING_FASTZIPZONES_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . ''; $this->enabled = MODULE_SHIPPING_FASTZIPZONES_STATUS; // Customize this setting for the number of zones needed (no change required by default) $this->num_zones = 1; //More options can be added later for Express, Overnight etc when someone codes it. $this->types = array('Fast Off-Peak' => 'std'); // Change this surcharge factor to increase your profit margin on freight $this->surcharge_factor = 1.1; } // class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; // First get the dest zip and check the db for our dest zone $zip = $order->delivery['postcode']; if ( $zip == '' ){ // Something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_FASTZIPZONES_NO_ZIPCODE_FOUND; return $this->quotes; } $sql = "SELECT * FROM fast_zones WHERE $zip >= f_postcode and $zip <= f_postcode"; $qResult = tep_db_query($sql); // run the query $rec = tep_db_fetch_array($qResult); // get the first row of the result $zone_id = $rec['f_zone']; if ( $zone_id == '' ){ // Something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_FASTZIPZONES_NO_ZONE_FOUND; return $this->quotes; } $sql = "SELECT f_rate FROM fast_rates WHERE f_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $cost = $aquote['f_rate']; } // Consignment charge insertion start $sql = "SELECT f_ccharge FROM fast_rates WHERE f_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $ccharge = $aquote['f_ccharge']; // Consignment charge insertion end } if ($shipping_weight <= '5') { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FASTZIPZONES_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_FASTZIPZONES_TEXT_DESCRIPTION, 'cost' => ((($ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_FASTZIPZONES_HANDLING)));} else { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FASTZIPZONES_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_FASTZIPZONES_TEXT_DESCRIPTION, 'cost' => ((($cost * ($shipping_weight - 5) + $ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_FASTZIPZONES_HANDLING)));} //1.10 added to calculate 10% GST on freight in Australia // if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_FASTZIPZONES_INVALID_ZONE; 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_FASTZIPZONES_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, date_added) VALUES ('Enable Fastway Postcode Zones Method', 'MODULE_SHIPPING_FASTZIPZONES_STATUS', '1', 'Do you want to offer Fastway postcode/zone rate shipping?', '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_FASTZIPZONES_HANDLING', '0', 'Handling Fee for this shipping method', '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() { $keys = array( 'MODULE_SHIPPING_FASTZIPZONES_STATUS', 'MODULE_SHIPPING_FASTZIPZONES_HANDLING', ); return $keys; } } ?> For the DB tables, I have the following: (have included the first line of the data it uses as an example to help explain it) CREATE TABLE `fast_rates` ( `f_zone_id` varchar(4) NOT NULL default '', `f_rate` decimal(3,2) NOT NULL default '0.00', `f_ccharge` decimal(4,2) NOT NULL default '0.00', PRIMARY KEY (`f_zone_id`) ) TYPE=MyISAM; # INSERT INTO `fast_rates` VALUES ('ZONE', 'EXCESS WEIGHT RATE', 'BASE CON CHARGE'); # eg INSERT INTO `fast_rates` VALUES ('L', '4.40', '6.70'); CREATE TABLE `fast_zones` ( `f_sub_oid` varchar(6) NOT NULL default '', `f_suburb` varchar(40) NOT NULL default '', `f_postcode` varchar(5) NOT NULL default '', `f_zone` varchar(4) NOT NULL default '', `f_eta` varchar(10) NOT NULL default '', PRIMARY KEY (`f_sub_oid`) ) TYPE=MyISAM; # INSERT INTO `fast_zones` VALUES ('OID', 'SUBURB', 'P CODE', 'ZONE LABEL', 'DEL TIME ETA'); # eg: INSERT INTO `fast_zones` VALUES ('1', 'ABBA RIVER', '6280', 'W', '4-9 DAYS'); Quote Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2006 Share Posted January 20, 2006 WOW, 34 views already, hope we get that many responses soon, as I'm sure I'm not the only one with this issue :) Anyway, here is the link for the TNT Australia Shipping based on postcode code that I have modified. I'll leave the crdits for when contribution gets created. GO team GO! Quote Link to comment Share on other sites More sharing options...
ratava Posted March 24, 2006 Share Posted March 24, 2006 WOW, 34 views already, hope we get that many responses soon, as I'm sure I'm not the only one with this issue :)Anyway, here is the link for the TNT Australia Shipping based on postcode code that I have modified. I'll leave the crdits for when contribution gets created. GO team GO! Out of intrest I have just released a version of the TNT shipping module ported back to Toll. The new module and new features and could be easily me modded for other couriers. I am working on Couriers Please at the moment, it should be released in a couple of days. http://www.oscommerce.com/community/contributions,4124 I am happy to look at other couriers in Australia. Quote Link to comment Share on other sites More sharing options...
Roomeat Posted May 3, 2006 Share Posted May 3, 2006 Is Fastway Australia Wide?? What is the general consensus on courier to use?? Tool, TNT, Fastway?? What about Australia Post?? I am just setting p a new store myself. Have some great contributions running, some products entered.. and now need to figure out how to add in the cost of freight. Do these modules work with both weight AND size?? as I know some of my products do not weight much.. but are large domensions.. so most couriers work a cubic rate on these. Quote Link to comment Share on other sites More sharing options...
ratava Posted May 3, 2006 Share Posted May 3, 2006 Is Fastway Australia Wide??What is the general consensus on courier to use?? Tool, TNT, Fastway?? What about Australia Post?? I am just setting p a new store myself. Have some great contributions running, some products entered.. and now need to figure out how to add in the cost of freight. Do these modules work with both weight AND size?? as I know some of my products do not weight much.. but are large domensions.. so most couriers work a cubic rate on these. You need to find who is going to give you the best deal. When I wrote the TNT and Couriers Please modules I had to based on the products stored weight. However the weight that is recorded on the product can be a dead weight or a cubic weight. You will have to work out what each product is going to be and store that. Unfortunatly there is no support in oscommerce for a separate cubic and dead weight. There is a very good australia post module that works out costs live for the customer. Quote Link to comment Share on other sites More sharing options...
Leak-Proof Posted May 19, 2006 Share Posted May 19, 2006 Hello from Canada! We have Fastway Courriers here as well and I have been trying to set up the Per Item module to accommodate it.(Not doing so well) I set up the per item rate of the $8.50 per package and set a zone restriction for the Province of Ontario. However, the courrier is only available in portions of Southern Ontario with the corresponding postal codes. Our postal codes look like this (L4N 8N2, L9C 6R7) they can be inputed with the space or without.i.e., (L4N8N2, or L9C6R7), most people put in the space. Fastway looks at the first 3 characters of the code, some times 4. There are 252 codes that I need to use in an automated system that will only use the first 3 characters of the 6 character code (without the space). How I worked around the additional restriction issue was to include the Fastway delivery map and all the postal codes (text) that allow the shipping in a text. (It's in the information box as a link.) The customer is asked to choose that shipping method if they are on the list. Otherwise the order may be held until a proper method is arranged. Not a very good option, so I'm looking for something else. What do you guys think? Also, after many contribution installs, my per item module is carrying 2 additional items through the checkout, so my customer is charged 3 x $8.50 for the one item. If they order 5 items, they get charged for 7. Always two extra being added. Go figure? My store is not live yet, but it's here at https://leak-proof.com/catalog Quote I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting... Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database. Link to comment Share on other sites More sharing options...
elogicmedia Posted November 10, 2006 Share Posted November 10, 2006 how did this fastway module end up going? Did you get it working with some success? If so I wouldn't mind seeing the updated code and tables so I can offer it for my own cart. Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 31, 2007 Share Posted March 31, 2007 how did this fastway module end up going? Did you get it working with some success? If so I wouldn't mind seeing the updated code and tables so I can offer it for my own cart. Thanks! Hey Elogic, Gigabitz ended up seeking the assistance of a developer to sort it out a while ago - both of them are in QLD, so there is some work for you if you live elsewhere. You would have to do a search on google for fastway and it should show up. (there was some beef with the osCommerce dev team and this developer so you wont find reference to his code here) Unfortunaletly though due to how Fastway work out their rate tables for different parts of the country I gave up trying to implement it for my wifes NSW based site. The amount of time I was wasting wasn't worth it - considering the majority look at the website and then call us up for a local delivery, we do drop it off ourself. I just made the decision to the wife that anything to be sent elsewhere was going via Auspost and we would manually work it out with the client - their understanding. :) Quote Link to comment Share on other sites More sharing options...
Durisian Posted April 7, 2007 Share Posted April 7, 2007 Here's a fastway australia module that I found. http://www.snowtech.com.au/index.php?cPath=1_8_20_18 Quote Link to comment Share on other sites More sharing options...
staling Posted August 19, 2007 Share Posted August 19, 2007 Yeah that snowtech mod isn't that great. It only offers 4 national shipping zones where there are 5 (Red, Orange, Green, White & Grey) and changing the dispatch postcode does absolutely nothing, the mod still assumes that you are in NSW which is useless as I am in Adelaide. It needs to be released with an sql file for each state / franchise area. I tried changing the dispatch postcode to mine and did a trial run to send something to myself and it set the rate at a zone 2 rate (or orange sticker) rather than the local delivery charge. Which is what it would cost were I in nsw :angry: So anyone using this you might want to check it's doing what you want it to. If anyone fixes it, please let me now E-Mail Me Quote Link to comment Share on other sites More sharing options...
joy4land Posted August 28, 2007 Share Posted August 28, 2007 Yeah, I found that problem as well. As my business based in Melbourne, this shipping moudle is useless for me. Quote 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.