Jump to content
tgritsop

Shipping based on Table rate (by weight)

Recommended Posts

Hi all

 

Just wondering how the weight and pricing can be written for the table rate shipping module.

 

If I want to ship only between a certain range of weight (eg 10kg to 20 kg), how am I supposed to write it?

 

I guess the syntax is 10-20: 50

 

in my shop, I have placed this syntax in the shipping module

 

10-14.99:197, 15-20.99:260, 20-24.99:322, 25-29.99:385 etc

 

and the module is activated for weights below 10 kg too.

 

Is there a way to overcome this case?

 

thank you in advance

Share this post


Link to post
Share on other sites

@@tgritsop

 

For the below 10kg not to show I am unsure how to do it but, for the rest (per your example) it would be as the follows:

 

14.99:197,19.99:260,24.99:322,29.99:385

 

This means any weight up to 14.99 charge 197. Anything 15 to 19.99 charge 260. Anything 20 to 24.99 charge 322. Anything 25 to 29.99 charge 385

 

Another example, If you want free shipping after say 30kg would be:

 

14.99:197,19.99:260,24.99:322,29.99:385,100000:0.00

 

It would read the same as above except anything from 30kg to 100,000kg would be free.

 

Rainer @raiwa wrote a few lines of code for me for nothing to show below 0. Maybe he could write for you for nothing to show below 10.

 

Take care

Bill

Edited by ecommunlimited

Share this post


Link to post
Share on other sites

@@tgritsop You can't have an entry like 10-14.99:197. The first number is the maximum amount and the second, after the colon, is the cost, as explained by @@ecommunlimited. So 14.99:197 would charge $197 for a cost or weight up to 14.99, though you should use 15:197 instead.

 

If you want a range, you would use an entry for the bottom level. For example, let's say the cost to ship anything under 10 lbs and over 15 lbs is $100 (or whatever your dimensions are) and that the cost to ship for items from 10 to 15 is $9, then the entry would be:

 

10:100;15:9;10000:100

 

or shown differently

 

10:100;  = $100 for 0 to 10

15:9;      = $9 for 10 up to 15

10000:100 = $100 for 15 to 10,000

Share this post


Link to post
Share on other sites

Thank you for the input.

 

I have created a dummy price up to 9.99:0 and coded the shipping module to check if the first block = 0 and the total weight of the order is < 9.99 then execution be aborted. This way the module is practically inactive if the weight to be shipped is less than 9.99; if it is more then the criteria of weight more than 10 kg is affirmed and the module is executed.

 

Thank you all for the help!

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

×