Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Zone shipping rate not calculating correctly


scrw

Recommended Posts

Its pricing each item individually rather than calculating the whole order at the end, eg:

2 items at 5kg

5kg shipping is ?20

10 kg shipping is ?30

I am getting a shipping price of ?40, IE 2 x the 5kg rather than calculating the total weight of the order.

any ideas how to fix???

Link to comment
Share on other sites

Its pricing each item individually rather than calculating the whole order at the end, eg:

2 items at 5kg

5kg shipping is ?20

10 kg shipping is ?30

I am getting a shipping price of ?40, IE 2 x the 5kg rather than calculating the total weight of the order.

any ideas how to fix???

 

What's your setting in Admin->Configuration->Shipping/Packaging->'Enter the maximum packaging weight you will ship' ? And the 'Package Tare weight' ?

Link to comment
Share on other sites

max 50

tare 0

 

I have mine at 20 kg. max and also 0 tare weight and not the problem you experience. I have struggled though in the beginning with gram/kg and found I have to define the weight for my products like 0.5 for half a kilogram, 1 for a kilogram etc. Could it be you fill in the weight with your products differently so the calculation for one or more packages goes wrong ?

Link to comment
Share on other sites

all the weights are correct, an item with a weight value of 8 ships with a rate assigned to 8, but add another item with a weight of 4 to make a total of 12 and it says you cant ship it, seems the maths behind the shipping module isnt working. :(

Link to comment
Share on other sites

all the weights are correct, an item with a weight value of 8 ships with a rate assigned to 8, but add another item with a weight of 4 to make a total of 12 and it says you cant ship it, seems the maths behind the shipping module isnt working. :(

 

Are you using a specific shipping module and/or changed one ? It is strange as going wrong with the max. weight setting I read sometime could cause this trouble but with you everything seems normal and nevertheless your packages are divided as soon as you go over 10 kg. (it is always the 10 kg. right where it goes wrong ?).

Another thing comes in mind; do you use some kind of contribution which makes seperate pricing/shipping per product possible ?

Link to comment
Share on other sites

its just the royal mail module.

Have a look/go at http://shop.chestermodels.com excuse the graphic for the mo, want to get it working before I sort the pictures. I have created a few items with the weight specified for testing (oh and use UK in your address for the mo as I have set it to only ship to UK for now)

 

cheers

 

Steve

Link to comment
Share on other sites

its just the royal mail module.

Have a look/go at http://shop.chestermodels.com excuse the graphic for the mo, want to get it working before I sort the pictures. I have created a few items with the weight specified for testing (oh and use UK in your address for the mo as I have set it to only ship to UK for now)

 

cheers

 

Steve

Hello Steve,

 

Hmm, I am just writing here while testing

I added a 8 kg. object to the cart, a piece of software with no weight given and a 100 gr. boat. With this no delivery at all is possible.

With the 8 kg. object only Royal Mail special delivery = 18 UK pounds

The 8 kg. with the 100 gram object gives 8.1 kg = 20 UK pounds

Question: why no standard delivery which sounds cheaper and does the UK not have weight ranges (ie. 5-10 kg., 10-15 kg. etc.) ?

Now I am looking a the 100 gram object only and I can finally choose between standard delivery and special delivery. Oddly enough the standard delivery is more expensive as the special delivery, 5 pounds against 4 pounds.

Maybe this is how it should be as I don't know the UK postal rates/system but it all does seem a bit odd.

With an 8 kg. object plus a 4 kg. object I can choose nothing. With an 8 + 0.5 kg. object I can only choose for special delivery for 20 pounds. However when I continue until the last checkout page it says Royal Mail Special Delivery ( GB : 8.5 ): ?19.50 ? Might be something with the tax calculation ?

Can you show some of your specified zone shipping tables ? I am curious how they look and they may point to what is going wrong. On the other hand I did not find a situation where I would get 2 packages but maybe you have made changes meanwhile which cured this (by disabling shipping options over 10 kg. ?).

 

Howard

Link to comment
Share on other sites

Standard Parcel is the cheapest way in the UK for more than 1kg (anything less is normal post but no insurace included), special delivery is good upto 10kgs and next day delivery

 

table for standard parcel rate

 

Zone Based Rates

 

Enable Zones Method

True

 

Tax Class

--none--

 

Sort Order

1

 

Zone 1 Countries

GB

 

Zone 1 Shipping Table

1:3.96,1.5:4.95,2:5.28,4:8.30,6:8.99,8:10.10,10:10.77,20:12.36

 

Zone 1 Handling Fee

0

 

 

for special delivery:

Zone Based Rates

 

Enable Zones Method

True

 

Tax Class

--none--

 

Sort Order

2

 

Zone 1 Countries

GB

 

Zone 1 Shipping Table

0.5:4.1,1:5.25,2:6.6,10:18.5

 

Zone 1 Handling Fee

0

 

Just taken vat of both.

 

 

Best only test with the test items on the front page, i havent checked the default items for weight yet

Link to comment
Share on other sites

Standard Parcel is the cheapest way in the UK for more than 1kg (anything less is normal post but no insurace included), special delivery is good upto 10kgs and next day delivery

 

table for standard parcel rate

 

Zone Based Rates

 

Enable Zones Method

True

 

Tax Class

--none--

 

Sort Order

1

 

Zone 1 Countries

GB

 

Zone 1 Shipping Table

1:3.96,1.5:4.95,2:5.28,4:8.30,6:8.99,8:10.10,10:10.77,20:12.36

 

Zone 1 Handling Fee

0

for special delivery:

Zone Based Rates

 

Enable Zones Method

True

 

Tax Class

--none--

 

Sort Order

2

 

Zone 1 Countries

GB

 

Zone 1 Shipping Table

0.5:4.1,1:5.25,2:6.6,10:18.5

 

Zone 1 Handling Fee

0

 

Just taken vat of both.

Best only test with the test items on the front page, i havent checked the default items for weight yet

 

The shipping tables look alright to me so that shouldn't give the problem. Looking at what you give however I assume you have two zone modules activated ?

If so, how did you create the second one ? If you just made a copy of the stock osC zone module with a different name you will get trouble.

I use this contribution to be able to have priority and standard shipping based on zones and which works perfectly.

When I look at the sample test I gave you about the 8.1 kg. package I should have had the choice for standard parcel AND special delivery but I only got special delivery which is not according the tables you specified.

Link to comment
Share on other sites

Thanks alot Howard, the link you gave works just fine, have now installed it :thumbsup: :D

 

Just need to sort out the rounding up to whole numbers in the shipping price now. :rolleyes:

Edited by scrw
Link to comment
Share on other sites

Spoke too soon, try and order 20.1kg of bits, I have set the parcel limit to 20kgs, if the order goes over this the weight sums dont seem to work :(

 

Morning Steve,

 

Just checked your site again for some packages over 20 kg. but it does seem to work alright. It is only that on your shipping page it shows 1 package of 10.05 or 10.1 kg and not that in fact there are 2 packages now you went over the 20 kg. limit you set. When you continue to the last checkout page the shipping price does tell there are 2 packages calculated which is correct. I see the rounding problem but only on the shipping selection page, at the final checkout page it is correct ?!

what does seem to happen is if you have ie. a package of 21.5 kg. it makes it two packages of 10-20 kg. which gives 2x 12,36 pounds = 24,72 pounds

Logically I would say this should be 1 package of 20 kg. plus 1 package of 1,5 kg. which should give 12,36 pound + 4,94 pound = 17,30 pounds.

I am afraid however that is just how the modules are coded, if a package goes over the limit it gets divided by 2.

Also there is a difference with my site as I have both standard and priority with a maximum of 20 kg. and both options are always available (with divided packages or not). You have the special delivery set with a maximum of 10 kg. and the standard way with a maximum of 20 kg. With packages over 10 kg. your shipping module nicely says it can not deliver packages over 10 kg. for the special delivery option and only gives the standard option.

 

Some homework to do I am afraid :'(

Would you opt for making delivery not possible with packages over 20 kg. also or indeed have them divided over smaller packages ? With the last it is either to find a way to have the package dividing made smarter or live with the fact a customer is going to pay too much for shipping and just give him a refund for the difference.

One big problem stays when opting for more packages when the weight goes over the limit; what if 1 object alone is over 20 kg. ? You can't divide that fysically and probably not even have it shipped with the Royal Mail (as I can't with the Dutch post) ?

:lol: A good thing I have to test these shipping options a little further now also :lol:

Link to comment
Share on other sites

Haven't had much time to look into this but so far I found:

A too heavy package is not always divided over multiple packages.

Ie. if your package weight is 22 kg. and your last entry for the zone table is someting like 10:15,00 you will get the message that shipping costs can not be determined. They are set to zero however you can continue the checkout which shouldn't be possible.

This piece of code in zones.php and zones2.php

        if ($shipping == -1) {
         $shipping_cost = 0;
         $shipping_method = MODULE_SHIPPING_ZONES_UNDEFINED_RATE;
       } else {
.....

can be hacked to

        if ($shipping == -1) {
         $shipping_cost = 0;
         $shipping_method = MODULE_SHIPPING_ZONES_UNDEFINED_RATE;
         $error = true;
       } else {
.....

 

to prevent this in case the package weight can't be divided over mulitiple packages for some reason. The caveat is you will never see the message for MODULE_SHIPPING_ZONES_UNDEFINED_RATE anymore but only MODULE_SHIPPING_ZONES_INVALID_ZONE

I guess combining those messages is good enough for the moment. At least it is not possible to checkout anymore with zero shipping costs.

 

Another change I made for now is also in the catalog/includes/modules/shipping/zones.php and zones2.php

            if (MODULE_SHIPPING_ZONES_MODE == 'weight')
          	 $shipping_method .= " ("  . $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;

to

            if (MODULE_SHIPPING_ZONES_MODE == 'weight')
          	 $shipping_method .= " (" . $shipping_num_boxes . 'x ' . $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;

so at least it is shown how many packages there are.

 

I would appreciate if some more people could confirm and test these situations !

Link to comment
Share on other sites

I will try your code when I get home.

One thing I was going to try is to manually add different weights to the zone table to account for orders over 20kg, for example find out the cost of a 20kg + 10kg package and add an entry for 30kgs.

 

The max weight of orders in the shop will very rarely go over 20kgs.

 

cheers :thumbsup:

Link to comment
Share on other sites

Seems to work fine :thumbsup:

I have got around the calculated errors for 2 box weights by making up my own shipping cost manually in the zone table rather than letting OS do it, my max parcel size will be around 20-25kg so I have set the table up to 50kgs to be safe.

 

Thanks alot for your help on this, one step closer to a working store :D

Link to comment
Share on other sites

Seems to work fine  :thumbsup:

I have got around the calculated errors for 2 box weights by making up my own shipping cost manually in the zone table rather than letting OS do it, my max parcel size will be around 20-25kg so I have set the table up to 50kgs to be safe.

 

Thanks alot for your help on this, one step closer to a working store  :D

 

Good to hear you could figure out a workaround for the multiple packages !

I did one change more because I got some multiple packages which showed a weight of 16.66666666 kg.

Instead of

$shipping_weight

I did

round($shipping_weight,1)

so it would be showed as 16.7 kg.

For the time being it is good enough for me too I guess but when I get more time I want to look into a better calculation for mulitple packages (though it will probably hardly ever happen).

 

Cheers and good luck with your store :thumbsup:

Link to comment
Share on other sites

  • 4 years later...
Good to hear you could figure out a workaround for the multiple packages !

I did one change more because I got some multiple packages which showed a weight of 16.66666666 kg.

Instead of

$shipping_weight

I did

round($shipping_weight,1)

so it would be showed as 16.7 kg.

For the time being it is good enough for me too I guess but when I get more time I want to look into a better calculation for mulitple packages (though it will probably hardly ever happen).

 

Cheers and good luck with your store :thumbsup:

 

Hi, I too am having a problem with zone shipping. Every item I have is set to .90 oz and they all round up to .99 oz. When I tell it an item is 1.0 it rounds up even that to some silly number. Last I checked, 1+1=2 but not in this case.

 

It took a lot of trial and error to get items to stay at under 1 lb and not go over. Based on each item being 1 lb or under slightly, then I can use zones without a problem. I use 1 lb and not more to be able to count the number of items easily, so up to 1 =$4.00, up to 2=$6.00, up to 5 =$7.00. and so on. I am selling magazines and this item count system is enabling me to use the zone method but why rounding the weight and why such an odd number I don't know. In the includes/modules/shipping/zones.php there is a note in the comment text that says:

 

"It appears that the osC shipping system automatically rounds the

shipping weight up to the nearest whole unit. This makes it more

difficult to design precise shipping tables. If you want to, you

can hack the shipping.php file to get rid of the rounding."

 

But I cannot find anywhere that looks like it is rounding. It is not any shipping.php that I can find. Does anyone know where the rounding of weight is occuring? I think that is most of the problem people are having. I know it is in my case. I'd like to stop it. Appreciate it...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...