Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping HEL!P! zones


treterbai

Recommended Posts

Hello,

 

I need help on the shipping module. I need shipping done based on order total price based on 2 zones (US and non-US):

 

U.S. Orders:

$100 or more = free ship

$60 - $99.99 = Flat Rate: $10.00

$59.99 and under =Flat Rate: $6.00

 

non-US:

$250 or more=free ship

$75 - $249.99 = Flat Rate: $25.00

$74.99 and under= Flat Rate: $15.00

 

I have made up 2 zones and enabled the zones method but it only goes by weight? I am not sure how to set it up by price instead?

 

Thanks in advance!

Link to comment
Share on other sites

  • 2 months later...

There are 3 things you need to do.

 

0. Backup your database and files. No responsibility for this not working. It worked for me on v 2.2

1. you need the change the file admin/include/modules/shipping/zones.php

2. You need to add in more fields in the database using SQL

 

1.

Find this line

// CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED

$this->num_zones = 3;

replace with the 3 to the number of zones you wish to display ie 6.

 

2. Here is sample sql code for this. this adds zones 3 to 7. Inserting sample data.

Each zone is defined in theconfiguration table in the database. You'll see the existing ones there already.

 

Insert into configuration ( configuration_title,configuration_key,configuration_value,configuration_descript
ion,configuration_group_id,sort_order) values('Zone 3 Shipping Table', 'MODULE_SHIPPING_ZONES_COST_3',
'
100:3.50,
250:4.75,
500:6.00,
1000:7.25,
1500:8.50,
2000:10.00,
5000:18.00
','Shipping rates to Zone 3 destinations based on a group of maximum order weights expressed in grams. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone 3 destinations.',6,0);
Insert into configuration ( configuration_title,configuration_key,configuration_value,configuration_descript
ion,configuration_group_id,sort_order) values('Zone 4 Shipping Table', 'MODULE_SHIPPING_ZONES_COST_4',
'
100:8.50,
250:10.50,
500:20.00,
1000:30.00,
1500:40.00,
2000:50.00,
5000:75.00
','Shipping rates to Zone 4 destinations based on a group of maximum order weights expressed in grams. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone 4 destinations.',6,0);
Insert into configuration ( configuration_title,configuration_key,configuration_value,configuration_descript
ion,configuration_group_id,sort_order) values('Zone 5 Shipping Table', 'MODULE_SHIPPING_ZONES_COST_5',
'
100:6.50,
250:7.75,
500:8.75,
1000:12.00,
1500:16.00,
2000:20.00,
5000:30.00
','Shipping rates to Zone 5 destinations based on a group of maximum order weights expressed in grams. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone 5 destinations.',6,0);
Insert into configuration ( configuration_title,configuration_key,configuration_value,configuration_descript
ion,configuration_group_id,sort_order ) values('Zone 6 Shipping Table', 'MODULE_SHIPPING_ZONES_COST_6',
'
100:10.50,
250:12.50,
500:22.00,
1000:32.00,
1500:42.00,
2000:52.00,
5000:75.00
','Shipping rates to Zone 6 destinations based on a group of maximum order weights expressed in grams. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone 6 destinations.',6,0);
Insert into configuration ( configuration_title,configuration_key,configuration_value,configuration_descript
ion,configuration_group_id,sort_order ) values('Zone 7 Shipping Table', 'MODULE_SHIPPING_ZONES_COST_7',
'
100:9.00,
250:11.50,
500:21.00,
1000:32.00,
1500:43.00,
2000:54.00,
5000:75.00
','Shipping rates to Zone 7 destinations based on a group of maximum order weights expressed in grams. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone 7 destinations.',6,0);
Insert into configuration (configuration_title,configuration_key,configuration_value,configuration_desc
ription,configuration_group_id,sort_order) values('Zone 3 Countries','MODULE_SHIPPING_ZONES_COUNTRIES_3','IE','Comma separated list of two character ISO country codes that are part of Zone 4.',6,0 );
Insert into configuration (configuration_title,configuration_key,configuration_value,configuration_desc
ription,configuration_group_id,sort_order) values('Zone 4 Countries','MODULE_SHIPPING_ZONES_COUNTRIES_4','JP,AU,NZ,SG','Comma separated list of two character ISO country codes that are part of Zone 5.',6,0 );
Insert into configuration (configuration_title,configuration_key,configuration_value,configuration_desc
ription,configuration_group_id,sort_order) values('Zone 5 Countries','MODULE_SHIPPING_ZONES_COUNTRIES_5','AT,BE,FR,DE,GL,IS,IT,NO,NL,DK,PL,ES,SE,CH,FI,PT,IL,GR','Comma separated list of two character ISO country codes that are part of Zone 6.',6,0 );
Insert into configuration (configuration_title,configuration_key,configuration_value,configuration_desc
ription,configuration_group_id,sort_order) values('Zone 6 Countries','MODULE_SHIPPING_ZONES_COUNTRIES_6','TW,CN,HK','Comma separated list of two character ISO country codes that are part of Zone 6.',6,0 );
Insert into configuration (configuration_title,configuration_key,configuration_value,configuration_desc
ription,configuration_group_id,sort_order) values('Zone 7 Countries','MODULE_SHIPPING_ZONES_COUNTRIES_6','CA','Comma separated list of two character ISO country codes that are part of Zone 7.',6,0 );

 

 

Hope this solves the issue.

I will make this a contribution some day.

It just needs a simple php file with input parameters.

 

Regards

Sean

free is often better than cheap

Link to comment
Share on other sites

  • 1 year later...

Archived

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

×
×
  • Create New...