Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

zones shipping - help please!


Guest

Recommended Posts

hi,

I find that the zones shipping method is almost perfect for the store i'm making.

The problem with it is that i want to charge delivery based on order total not weight.

The reason zones is so perfect is that the customer needs to ship to UK, Europe, US and rest of world.

 

This facilitiates the need for 3 or 4 zones (which i've done) and order total based charging to each zone, not weight which is all that's offered in the zones module.

 

Does anyone know how to do this??

Link to comment
Share on other sites

I am looking for that same answer, I have been trying now for 8 hours hacking files and it is only showing shipping by weight and not item number anyone have any suggestions here??

Link to comment
Share on other sites

Zone shipping method based on total cost:

 

Try this. go to

/catalog/includes/modules/shipping/zones.php

 

find this around line 116

 

global $order, $shipping_weight;

change to

global $order, $shipping_weight,$cart;

  

   if (MODULE_SHIPPING_ZONE_MODE == 'price') {

       $order_total_price = $cart->show_total();

     } else {

       $order_total_price = $shipping_weight;

     }

line 145 to 151

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;

         }

       }

change to

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

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

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

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

           break;

         }

       }

Around line 186 find function install() {

add this

 

      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 ('Mode', 'MODULE_SHIPPING_ZONE_MODE', 'weight', 'Is the shipping table based on total Weight or Total amount of order.', '6', '0', 'tep_cfg_select_option(array('weight', 'price'), ', now())");

 

line 208 find

      $keys = array('MODULE_SHIPPING_ZONES_STATUS', 'MODULE_SHIPPING_ZONES_TAX_CLASS', 'MODULE_SHIPPING_ZONES_SORT_ORDER,');

replace by

      $keys = array('MODULE_SHIPPING_ZONES_STATUS', 'MODULE_SHIPPING_ZONES_TAX_CLASS', 'MODULE_SHIPPING_ZONES_SORT_ORDER','MODULE_SHIPPING_ZONE_MODE');

 

 

and that is it. i hope it helps. i just figured out tonight and it works well for me.

OkayM.

Link to comment
Share on other sites

it isn't working for me...I have tried selecting mode to be both weight and price...and it is still adding it up wrong

 

my zone is

GB

1:.60,2:.70,3:.80,4:.90,5+:10

 

and when I put one item in the cart it is saying either

weight: .80gbp

by price: .70 gbp

 

there is no radio button to select by item? should there be and did I miss something?

Link to comment
Share on other sites

  • 2 weeks later...

Just so you don think i'm the most ungrateful person in the world - i now have time to get back on this and i'll le tyou know how i go.

 

Thanks again!

Link to comment
Share on other sites

It's a good idea but i have different prices associated with different product attributes so the price is quite changeable for most products.

 

I have tried the code and it still seems to charge based on weight.

As my customer doesn't care too much about weight yet, we dont add weight to all products and for most purchases we have a shipping weight of 3lbs (random products at 1lb each) and a charge of ?10 (the charge for shipping if under ?100 order total).

 

In the admin section it is not asking me what method to use.

 

Is that normal? It looks as though i be able to select weight or price?

 

Do you know which table this updates? I can check to see if it is reading/writing to the table.

 

thanks

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...