If this is your first visit, check our documentation. To post, register or login.
Forums / Built-in Shipping and Payment Modules / Shipping by each box of product

Shipping by each box of product

Locked

Started by velvetangels on 10 Jan 2008, 10:03 PM · Views: 1,274

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
10 Jan 2008, 10:03 PM
#1
velvetangels avatar

velvetangels

New Zenner

Join Date:
Sep 2007
Posts:
27
Plugin Contributions:
0

Shipping by each box of product

I was wondering if there was a setting where each product can have shipping calculated by itself.

my company is a wholesaler of clothes and we ship in prepacked boxes of 24 items that weigh anywhere from 5lb to 25+ lb per box.

I was wondering if Zencart had a way to calculate the shipping on each box where if the customer buys 10 boxes of 20 lb items it would be a total weight of 200 pounds shipped but individually 10 different boxes shipped at 20 lb weight.

I tried using the perweightunit Shipping module and i don't think it would be as helpful because the price may change if we are shipping domestically to California compared to New York or even if we were shipping internationally.

Thanks for the amazing shopping cart and I will be buying the book soon for my design business (once it gets off the ground)

PS. I found that if I change the "Enter the Maximum Package Weight you will ship" it doesnt try to combine products into one package and it looks like it charges it correctly. so maybe a way to set it so it doesnt try to combine products?

11 Jan 2008, 8:20 PM
#2
velvetangels avatar

velvetangels

New Zenner

Join Date:
Sep 2007
Posts:
27
Plugin Contributions:
0

Re: Shipping by each box of product

I think I found the statement that sets the weight of each package to the "Enter the Maximum Package Weight you will ship" :clap:

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

I think that if SHIPPING_MAX_WEIGHT is changed to the number of items in the cart then it should just calculate shipping on each item in the cart.

Now I just need to figure out how to get the number of items in the cart into here, so far unsuccessful. (in includes\classes\shipping.php) :lamo:

11 Jan 2008, 9:01 PM
#3
velvetangels avatar

velvetangels

New Zenner

Join Date:
Sep 2007
Posts:
27
Plugin Contributions:
0

Re: Shipping by each box of product

I think I found the statement that sets the weight of each package to the "Enter the Maximum Package Weight you will ship" :clap:
(includes\classes\shipping.php)

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

If the $shipping_num_boxes is changed to reflect the # of products in the shopping cart then it calculate the shipping on each box.

11 Jan 2008, 11:51 PM
#4
velvetangels avatar

velvetangels

New Zenner

Join Date:
Sep 2007
Posts:
27
Plugin Contributions:
0

Re: Shipping by each box of product

LOL, actually never mind that doesnt work very well. It does help with only one product in the shopping cart but once you get 2 products with 2 different weights it will average those together. It gets very close for shipping cost with USPS (a little over what they charge)

but oh well it is a start.

Anyone else with any idea's on it?

18 Jan 2008, 8:50 AM
#5
dbrn avatar

dbrn

New Zenner

Join Date:
Oct 2007
Posts:
3
Plugin Contributions:
0

Re: Shipping by each box of product

I got the same problem, I asked here more than once and never got an answer, I am afraid that no one can help us :( I think that editing the file that calculates the number of shipping boxes could be the solution, so it's better to learn some php coding and try to do it by ourselves :P

20 Jan 2008, 7:31 PM
#6
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Shipping by each box of product

dbrn:

I got the same problem, I asked here more than once and never got an answer, I am afraid that no one can help us :( I think that editing the file that calculates the number of shipping boxes could be the solution, so it's better to learn some php coding and try to do it by ourselves :P

Please post when you get this worked out. I have a wholesaler that if a customer orders 5 of the same thing (which just happened), they ship out 5 boxes and shipping is not the sum of the weight, but the price of 1 box times 5. The shipping I charged is $100 less than what they wholesaler is charging and there goes my profit! I also don't want this to apply to all of my categories, just certain ones. Do you think that is do-able?

21 Jan 2008, 4:23 PM
#7
velvetangels avatar

velvetangels

New Zenner

Join Date:
Sep 2007
Posts:
27
Plugin Contributions:
0

Re: Shipping by each box of product

Doodlebuckets:

Please post when you get this worked out. I have a wholesaler that if a customer orders 5 of the same thing (which just happened), they ship out 5 boxes and shipping is not the sum of the weight, but the price of 1 box times 5. The shipping I charged is $100 less than what they wholesaler is charging and there goes my profit! I also don't want this to apply to all of my categories, just certain ones. Do you think that is do-able?

The fix that I have found is a simple one and does the trick but it is basically an average for all items in the shopping cart.

If you have 10 of the same item that all weight the same amount (10 LB) then it will total up 10 x 10LB = 100Lb then divide it by the number of items in the shopping cart 10 and will put it at 10LB per box. The problem that I am having is that if I have 2 items in the cart (10LB & 20LB) then it will do an average of all the weights and come out to like 12.5LB. when it runs it through USPS it does come out to about the same amount (usually about a few $$ over) but I haven't tested it on any other's yet.

If I get any further on this I will definitely post it here.

Technically it is possible to do it for a certain category. From what I know of zencart it would need what category each product is in then you could do an if statement to only do this special shipping calc for that category and do the normal one for every other one.

21 Jan 2008, 4:35 PM
#8
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Shipping by each box of product

velvetangels:

The fix that I have found is a simple one and does the trick but it is basically an average for all items in the shopping cart.

If you have 10 of the same item that all weight the same amount (10 LB) then it will total up 10 x 10LB = 100Lb then divide it by the number of items in the shopping cart 10 and will put it at 10LB per box. The problem that I am having is that if I have 2 items in the cart (10LB & 20LB) then it will do an average of all the weights and come out to like 12.5LB. when it runs it through USPS it does come out to about the same amount (usually about a few $$ over) but I haven't tested it on any other's yet.

If I get any further on this I will definitely post it here.

Technically it is possible to do it for a certain category. From what I know of zencart it would need what category each product is in then you could do an if statement to only do this special shipping calc for that category and do the normal one for every other one.

What I ended up doing is setting the max box size I would ship to 10lbs and adjusted the weights of individual items to make the calculated values fall in the ballpark of what they needed to be. I tested for both large and small items and found the shipping prices to be reasonable. I also turned off the show weight and number of boxes and just made the cart show just the weight so that no one was confused. Thanks for your input! This thread was very helpful in helping me to get things right...

6 May 2008, 11:18 PM
#9
velvetangels avatar

velvetangels

New Zenner

Join Date:
Sep 2007
Posts:
27
Plugin Contributions:
0

Re: Shipping by each box of product

I was testing this further and the small mod that I did is working so far. I am using book rates from UPS's website and it comes out identical every time even if the products have different weights and different amounts.