Zen Cart Logo

Shipping box numbers

Locked

Views: 2,150

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
21 Oct 2009, 1:46 PM
#1
acummins avatar

acummins

New Zenner

Join Date:
Jun 2008
Posts:
63
Plugin Contributions:
0

Shipping box numbers

Hi all

I set the following as:

Maximum Package Weight: 0.2
Products Shipping Weight: 0.2
Shipping rates to zone 1: 0.5:8.50,1:9,2:9.5,3:10 and so on.

I can explain the problem better in the following:

The customer buys 1 item: 1 x 0.2 lb, $8.5
The customer buys 2 items: 2 x 0.2 lb, $17
The customers buys 3 items: 4 x 0.15 lb, $34
For four items it is the same as above
The customer buys 5 items: 5 x 0.2 lb, $42.5

In the Delivery Information part of the Checkout process, I want the weight to be displayed as 0.2 lb no matter how many items the customer buys. However, in the example above it doesn’t show the correct weight in the third one. Also when 12 items are purchased, it displays as 0.18. Secondly, is it possible to calculate the shipping cost not like above but as I stated in the shipping rates zone? For instance, when 1 or 2 items are purchased, the customer will get charged only $8.5, if it is 3 items, $9, more than 1 lb $9.5 and so on.

Any suggestion appreciated.

21 Oct 2009, 7:07 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping box numbers

Do you only use Table Rate table/Zone Rate zones shipping module?

Are all of your Products 0.2 in weight? Or is that just your example?

21 Oct 2009, 7:54 PM
#3
acummins avatar

acummins

New Zenner

Join Date:
Jun 2008
Posts:
63
Plugin Contributions:
0

Re: Shipping box numbers

Hi Ajeh

I just use Zone Rate Module and yes, it is just an example. In the near future, however, when I finish the book and deal with the real products, the weight of each one will change a bit. Just for now, let's get stick to 0.2.

21 Oct 2009, 8:56 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping box numbers

There is a precision error on the php ceil() function ... so you need to change the shipping.php class file:
/includes/classes/shipping.php

to read:

      if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes
//        $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);
        $shipping_num_boxes = zen_round($shipping_weight/SHIPPING_MAX_WEIGHT);
        $shipping_weight = $shipping_weight/$shipping_num_boxes;
      }

This appears to fix the precision issues on things so small ...

22 Oct 2009, 9:17 AM
#5
acummins avatar

acummins

New Zenner

Join Date:
Jun 2008
Posts:
63
Plugin Contributions:
0

Re: Shipping box numbers

Linda thanks a lot for the help. Now 0.2 lb thing remains the same.

However there is a small issue left. ZC still adds $8.5 for each 0.2 lb. If the shipping rates are configured as 0.5:8.50,1:9,1.5:9.5....., then for two items $8.5 should be charged instead of $17 and $9 for 3 items instead of $25.5, etc. The only way I can resolve this issue is to change the 'Maximum Package Weight' to a higher value i.e. 50. But in this case the number of packages is shown as 1. Is there a way to accomplish this without changing 0.2 to 50?

22 Oct 2009, 1:37 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping box numbers

The Zone Rate zones and Table Rate table are using the definitions based on the box weight ...

Set the first rate to charge 8000, example:
0.5:8000,1:9,2:9.5,3:10

Now add quantity 10 of 1 or more Products that weight .2 ...

That makes a total of 10 x .2 = 2 ...

However ...

2 / .2 maximum weight is 10 x .2 ... so it uses the .2 rate x 10 or 8000 x 10 ... for $80,000 ...

It never sees the other rates as the rates are based on the Box Sizes which is determined from the Maximum Weight ...

If what you are really trying to do is base your rates on the Item Count of Products, then try switching that to price things by Item Count rather than weight and re-do the quantity breaks ...

22 Oct 2009, 7:04 PM
#7
acummins avatar

acummins

New Zenner

Join Date:
Jun 2008
Posts:
63
Plugin Contributions:
0

Re: Shipping box numbers

Well, switching it to item count will cause problems for the products different in weight. Imagine that the customer pays the same shipping price for a 1lb and 3lb-item. I guess there is not a work around for this problem at least for now :((hope it will be). Thanks anyway Linda, you have been very helpful as always.

22 Oct 2009, 11:26 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping box numbers

Another way to do this is the Per Weight Unit where the products_weight is used as the shipping cost on a Per Item per quantity ...

So if you set the Product weight to: 2

and then order:
1 x 2 = 2.00
2 x 2 = 4.00
3 x 2 = 6.00
etc.

So if you set the Unit Rate on the Per Unit perweightunit to 1.00 and have 1 Product in the cart with quantity 1 with a weight of .20 and 1 Product in the with quantity 2 with a weight of 2.50 you would get:
1 x 1 x .20 = .20
1 x 2 x 2.50 = 5.00

for a total of 5.20 ...

NOTE: to use this, set the Maximum Weight to: 5000 and the Tare Weights to 0:0 ...

23 Oct 2009, 8:16 PM
#9
acummins avatar

acummins

New Zenner

Join Date:
Jun 2008
Posts:
63
Plugin Contributions:
0

Re: Shipping box numbers

Per Weight Unit seems to get the job done but it doesn't display the number of boxes and weight i.e. 1 x 0.2, 2 x 0.4. Is this a normal behaviour of this module or something missing?

23 Oct 2009, 10:50 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping box numbers

Per Weight Unit does not list the number of boxes as there really isn't a method to know how many are in the boxes based on the fact that products_weight is used as a shipping cost and not a weight that can be divided by the Maximum Weight and have any meaning ...

24 Oct 2009, 7:31 AM
#11
acummins avatar

acummins

New Zenner

Join Date:
Jun 2008
Posts:
63
Plugin Contributions:
0

Re: Shipping box numbers

Thank you for your help :smile: