Community Add-Ons

Add file to this package
Top » Shipping Modules

MultiGeoZone MultiTable Shipping
for osCommerce Online Merchant v2.2

=========================================
SUMMARY
=========================================
Allows shipping to multiple Geo Zones using multiple tables.

Geo Zones are defined in the osCommerce administration tool, so exactly what makes up each zone is left in the hands of the
user. Geo Zones can be just specific zones of a country, a number of different countries, or any combination thereof.

Legend:  Download   Report
Expand All / Collapse All
Update for Each Additional Weight gregwee 18 Nov 2009  

I've made a small change to the MZMT script to calculate shipping based on the cost per additional weight. e.g. most post offices will list the price for the first 0.5kg, 1kg, and after that, the cost will be for each additional 0.5kg.

For this change, I've used the * symbol to indicate that this will be the cost per additional weight. This MUST be the last item on the rate table.

e.g. your MZMT rate table will look like this:
.01:$3,1.5:$4,2:0.5*

To explain the above table, the cost from 0.1 lb to 1.49 lb is $3, 1.5 lb to 1.99 lb costs $4, then each additional 0.5 lb (2 lb - 1.5 lb) is an additional $0.50

To change it so that it is calculated based on 1 lb, just change the table so that the last two fields is a difference of 1 instead of 0.5.
Example rate table:
.01:$3,1:$4,2:0.5*


Changes made:
Line 152, look for:
$shipping_factor = $table_cost[$i+1];

Add the following after the line:
$previous_weight = $table_cost[$i-2];
$previous_cost = $table_cost[$i-1];
$current_weight = $table_cost[$i];



Line 160, look for:
$shipping = ((($this->order_total*10)/10)*((str_replace('%', '', $shipping_factor))/100));

Add the following after the line:
} elseif (substr_count($shipping_factor, '*') > 0) {
$weight_measure = $current_weight - $previous_weight; //Find out how much is each additional factor eg. additional 0.5 lb or additional 1 lb
$add_cost = ceil((($this->order_total - $previous_weight)/$weight_measure)) * (str_replace('*', '', $shipping_factor)); //How many additional shipping cost
$shipping = str_replace('$', '', $previous_cost) + $add_cost;


You can also just replace the mzmt.php with the included file.

Fix to show weigth and correct units mutrox 28 Apr 2009  
MultiGeoZone MultiTable Shipping v1.21 1Putts 15 Apr 2009  
v1.2 homewetbar 24 Aug 2007  
MultiGeoZone MultiTable Shipping v1.101 (zip) Spyros 6 Feb 2006  
MultiGeoZone MultiTable Shipping v1.100 (zip) Antonio Garcia 29 Oct 2005  
MultiGeoZone MultiTable Shipping v1.100 Josh Dechant 9 Nov 2004  
MultiGeoZone MultiTable Shipping Josh Dechant 31 Oct 2004