Jump to content
Sign in to follow this  
j_uprichard

Zones shipping based on Total Cost

Recommended Posts

Can someone point me in the right direction with this query. I basically require a combination of the Table Rate and Zones Rate Shipping. For example, I have 3 zones but i wish to set my shippig costs based on total order cost (price) boundaries instead of total weight.

 

I've googled and search both the contributions and forum sites but cannot find anything?! I thought this would be quite a popular method of shipping - am i just searching using the wrong keywords? All hlp greatly appreciated.

Regards, Jamie

Share this post


Link to post
Share on other sites
Can someone point me in the right direction with this query. I basically require a combination of the Table Rate and Zones Rate Shipping. For example, I have 3 zones but i wish to set my shippig costs based on total order cost (price) boundaries instead of total weight.

 

I've googled and search both the contributions and forum sites but cannot find anything?! I thought this would be quite a popular method of shipping - am i just searching using the wrong keywords? All hlp greatly appreciated.

Regards, Jamie

 

in the file includes/modules/shipping/zones.php, you will find the following code:

$zones_table = split("[:,]" , $zones_cost);

$size = sizeof($zones_table);

for ($i=0; $i<$size; $i+=2) {

if ($shipping_weight <= $zones_table[$i]) {

$shipping = $zones_table[$i+1];

$shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;

break;

}

}

 

Replace that piece of code by the following:

$order_total = $cart->show_total();

$zones_table = split("[:,]" , $zones_cost);

$size = sizeof($zones_table);

for ($i=0; $i<$size; $i+=2) {

if ($order_total <= $zones_table[$i]) {

$shipping = $zones_table[$i+1];

$shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;

break;

}

}

 

.. Once you ave changed the file and uploaded the changes WILL NOT reflect. you will ahve uninstall the zones module and install again. do the basic setup and it will work as desired.

 

Let me know if you see any issues.

 

Cheers

Hari

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×