Forums / Built-in Shipping and Payment Modules / Zone Shipping Cost based on Individual item weight, not total order weight

Zone Shipping Cost based on Individual item weight, not total order weight

Locked

Views: 7,869

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
16 Aug 2009, 12:52 PM
#1
pohnean avatar

pohnean

New Zenner

Join Date:
Jul 2009
Posts:
3
Plugin Contributions:
0

Zone Shipping Cost based on Individual item weight, not total order weight

Hi, this question is probably asked before but I couldnt find the answer to it after scouring the forum.

Im now using the Zone Rates module and 4 zones. Rates are based on weight and rates for each zone is different.

All of that is fine and dandy except when there are more than 1 item in the cart.

Now, all my items will be shipped in individual boxes and not altogether one 1 box. I want my shipping cost to be based on individual item weight instead of the total order weight.

For example, there are 2 items in the cart:

  1. Product 1, weight 1.5kg
  2. Product 2, weight 2.0kg

And the shipping table is as such (weight, price):
0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
29.5 34.5 41.0 52.0 58.5 64.5 71.0 75.0 81.5 87.0 93.0

Based on Zone 3 shipping rates above, the shipping costs should be:

  1. Product 1 - $41
  2. Product 2 - $52
    Total: $93

However, zen cart calculates it as follows:
(1.5kg + 2.0kg = 3.5kg) which is $71 based on the table.

What should I do in order to achieve the desired result?

16 Aug 2009, 3:55 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Do you actually have this "exact" information in your Zone Rates?

0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
29.5 34.5 41.0 52.0 58.5 64.5 71.0 75.0 81.5 87.0 93.0

If so, it is written wrong ... it has to be punctuated correctly to delimit the weight and price for each amount ...

Based on the need to have the shipping based on a "per Item" basis, you may want to look at the Per Unit perweightunit where the products_weight is the shipping cost of that item ...

Then, as you want different rates for different Zones, you could clone the Per Unit perweightunit shipping module and set the Unit Rate proportionally for each Zone ...

Example, if setting the weight to 2 meant $2.00 for US, and 2 meant $4.00 for Canada then you just change the Unit Rate to 2.00 ...

Example, if setting the weight to 2 meant $2.00 for US, and 2 meant $3.00 for Canada then you just change the Unit Rate to 1.50 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Aug 2009, 3:16 AM
#3
pohnean avatar

pohnean

New Zenner

Join Date:
Jul 2009
Posts:
3
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Ajeh, thanks for your swift response.

The zone rates above are for reference only.

I've input them in the delimited format and it works well except that I need my shipping rates to be computed individually for each item instead of computed using the sum of the weight of all items.

That method you've proposed using perweightunit works if my rates for each zone is porportionate. However, they are not exactly proportionate thus I cannot use that method.

17 Aug 2009, 4:13 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Zone Shipping Cost based on Individual item weight, not total order weight

How much off would they be if you used the Per Unit perweightunit method?

The current shipping methods do not work for 1 product per box and you would have to do quite a bit of customization to re-write everything for this ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Aug 2009, 4:14 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Zone Shipping Cost based on Individual item weight, not total order weight

NOTE: remember you also have the Handling Fee that can be worked in there as well per Zone (cloned) copy of the module to help with the rates ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Sep 2009, 10:43 PM
#6
klog avatar

klog

New Zenner

Join Date:
Feb 2007
Posts:
16
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Hi all,
I think this thread is similar if not identical to what I am working towards accomplishing. For sure I experienced the same issue with multiple items in the cart, throwing the shipping cost to zero. The zone rate module works exactly the way I wish as long as there is only ONE item in the cart.
My reason for working in this direction is that I drop ship many of my products and ship to many countries. The final shipping charge varies GREATLY sometimes from country to country. To me there is no ryhme nor reason as why, but I can't change it, that's for sure. For example it may cost $30 to ship to the UK, and $50 to ship to Germany (just a hypothetical)
Here's how I set it up: I used numeric "codes" in the item weight field for each product I have, eg. 1.01, 1.02, 1.03, etc. Defining the zone rates for example - Zone-1:
1.01:2.95,1.02:14.95,2.01:10.00,2.02:12.00,3.01:5.95, & so on.

Zone-2:
1.01:5.90,1.02:33.45,2.01:13.60,2.02:23.20,3.01:11.90, & so on.

At the moment I have 4 zones set up, but anticipate more.

I understand now why the module is making the cost ZERO if there is more than one item, because the module is taking the SUM of the weights (my "ship codes"), adding them and coming up with a value that I have not defined (with a cost). The thing is, there are simply too many (infinite perhaps) combinations (permutations?) of "codes" for me to anticipate, and thereby assign a total cost for the itemS being shipped to the particular zone the customer wants shipped to.
SO, after my long winded explanation, HOW can I make the zone rates module keep the charge assigned for each "code" and add them together, instead of adding the "codes" (weights) together and then looking for a zone definition that doesn't exist.
IS the perunitweight module the answer? I've looked at it several times, but can't get my head around how I can make that module accomplish want I want.
Any ideas?
Cheers & all the best, :smile:
Kevin
PS: http://kevinlogan.com/gallery2/main.php if anyone wants to see my cart in action.

9 Sep 2009, 2:43 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Zone Shipping Cost based on Individual item weight, not total order weight

The Per Unit perweightunit shipping module is designed to assign a shipping cost to each Product ...

Let's say you ship to the US and Canada and the UK ...

If you have a Product with the products_weight set to 2 for $2.00 to the US, then you would set the Unit Rate on the Per Unit shipping module to 1.00 ...
1 x 2 = $2.00

Now if you clone the Per Unit perweightunit shipping module for Canada so that this Product ships for $2.50, you would set the Unit Rate on the cloned Per Unit shipping module to 1.25 ...
1.25 x 2 = $2.50

Then, if you clone the Per Unit perweightunit shipping module for the UK so that the Product ships for $4.00, you would set the Unit Rate on the cloned Per Unit shipping to 2.00 ...
2.00 x 2 = $4.00

You are basically building the rates proportionally for each cloned copy of the Per Unit perweightunit shipping module ...

NOTE: be sure in the Configuration ... Shipping/Packaging ... that you are setting the Maximum Weight to 5000 and both the Tare Rates to 0:0 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Sep 2009, 5:14 PM
#8
klog avatar

klog

New Zenner

Join Date:
Feb 2007
Posts:
16
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Hi Linda,
Thanks for the info.
Question: are you saying that I should clone the perunitweight module for every country I ship to?

Cheers, :smile:
Kevin

10 Sep 2009, 10:01 AM
#9
klog avatar

klog

New Zenner

Join Date:
Feb 2007
Posts:
16
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Hi again,
Having slept on this idea of cloning the perweightunit pages, and actually working a bit on it, I've come to realize that as far as I can tell, this approach won't work for me, unless I make like a million clones (and zones), as I realized that there is NO consistency to the multiplier factor, eg 1.5X, 2X, 3X etc. the intital price I put in the weight fields. For example, it may cost $5 to ship product1 to the USA and $10 to Ireland (2X factor), but cost $10 to ship product2 to the USA and $40 to Ireland (4X factor).
I really wish I could get the zone rates approach to work as I attempted (which it does for single cart-items, not multiple cart items). If anyone has any ideas, word love to hear them. For example, is there any way to fake-out the php script, treating the weight fields (my "ship codes") simply as "identifiers" and not to be added?
Any way, thanks again for your help.
Cheers & all the best,
Kevin

11 Sep 2009, 4:32 AM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Could you define a bit more specifically what you mean by "identifiers" and how you envision using them?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Sep 2009, 6:43 AM
#11
klog avatar

klog

New Zenner

Join Date:
Feb 2007
Posts:
16
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Hi Linda, be happy to explain (better hopefully) what I mean.

Using the "weight" field I have put in "codes" that correspond to all of my possible products. My logic was/is numerals left of the decimal point are major categories of products and numerals right of the decimal are specific products within that category. In hindsight I should have used more significant digits right of the decimal point, and if I can get my shipping working the way I wish I will do that; for example instead of +3.01 I will input +3.00001, representing product #1 in category 3. The more-digit version seems to be the largest number of digits right of the decimal point the field will accept.
Using this "code" (e.g. +3.01) I put that into the "zone rates" zone Shipping Tables with different shipping charges for each zone as I wish:
ZONE 1: 1.01:2.95,1.02:14.95,2.01:10.00,2.02:12.00,3.01:5.95,3.02:,,,
ZONE 2: 1.01:4.00,1.02:20.00,2.01:16.00,2.02:18.00,3.01:12.50,3.02:,,,
Therefore, I guess my goal is to get the zones shipping module to not do any math function with my "codes", but add all the shipping charges for the corresponding products/zones that are in the cart when there is more than one product in the cart. My system worked perfectly until about 2 weeks ago. I received my first multi-product (photographs) order, and it came through with zero shipping charges, so I basically broke even on the order. Since then I've been trying to figure a way to have all my shipping variations (which are numerous because of the sizes I ship to various countries) be totaled up.
I drop-ship alot of my items, so I am already dealing with a marked-up (inflated) shipping charge, so I myself don't markup/roundup or "guesstimate" my shipping charges to make my life easy, I just simply want to automatically pass along my vendor's shipping charges. Make sense?
Cheers & all the best, :smile:
Kevin

13 Sep 2009, 3:22 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Zone Shipping Cost based on Individual item weight, not total order weight

The problem is that weight is treated as a total and not as individual components ...

You would have to customize a shipping module that manages the weight in a totally different manner to treat the weight per product as separate charges ...

The Per Unit perweightunit takes the Total weight and multiples that out by the Rate ... again this is a Total Weight and not looking specifically at each Product and its individual weight for a calculation ...

I believe in the Add Ons or Contributed Forum there are programs that can be setup for individual shipping costs per item in a more detailed manner but I have not used them ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 Sep 2009, 12:18 PM
#13
klog avatar

klog

New Zenner

Join Date:
Feb 2007
Posts:
16
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Hi Linda,

Any idea how to go about customizing the shipping module?
What page(s)?
Cheers,
Kevin

14 Sep 2009, 2:54 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Zone Shipping Cost based on Individual item weight, not total order weight

I would have to write the whole shipping module from scratch to get a shipping module to work based on a per product per weight per zone ...

Currently, this is not built into Zen Cart for this method ...

It would be a lot easier if your weights were proportional per zone ...

That way, you could enter 1 weight per product then each Zone would use its own Rate against the weight, for example:
US 1.00
Canada 1.25
UK 1.75
Rest of the World 2.00

That would allow the total weight of the order to be multiplied by these Rates to calculate the shipping ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Sep 2009, 7:47 PM
#15
klog avatar

klog

New Zenner

Join Date:
Feb 2007
Posts:
16
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Ajeh:

I would have to write the whole shipping module from scratch to get a shipping module to work based on a per product per weight per zone ...

Currently, this is not built into Zen Cart for this method ...

It would be a lot easier if your weights were proportional per zone ...

That way, you could enter 1 weight per product then each Zone would use its own Rate against the weight, for example:
US 1.00
Canada 1.25
UK 1.75
Rest of the World 2.00

That would allow the total weight of the order to be multiplied by these Rates to calculate the shipping ...

Hi Linda,
Well, I certainly wouldn't expect you to rewrite the program. I was actually thinking of giving it a go myself. I'm no expert, but I used to be smart (did a wee bit of programming in the old days, but now I am just a photographer:().

That said, I THINK a shopping cart that could accurately, and I stress accurately, put forth the actual charges for shipping based on item AND zone would be a valuable addition to ZenCart.
One of these days, when I have time/energy, perhaps I will give it a go myslef.
Thanks for all your input & help! :smile:
Cheers,
Kevin

16 Sep 2009, 8:02 AM
#16
klog avatar

klog

New Zenner

Join Date:
Feb 2007
Posts:
16
Plugin Contributions:
0

Re: Zone Shipping Cost based on Individual item weight, not total order weight

Update: I did come up with a "better than nothing" solution. It occured to me that the problem (shipping price is zero) only occurs when there is more than one item in the cart, and that the cart informs the buyer that "Shipping rate cannot be determined". SO I located where that phrase is defined (includes/languages/modules/shipping/zones.php) and modified that:
define('MODULE_SHIPPING_ZONES_UNDEFINED_RATE', '<font color="#FF0000">MY ERROR: Shipping rate cannot be determined.<br><a href="http://kevinlogan.com/gallery2/purchase/shipping_problem.htm" target="_self">Please <strong><font color="#FF0000">CLICK HERE</strong></font> for important info to determine shipping charge</a></font>');
going to a page (http://kevinlogan.com/gallery2/purchase/shipping_problem.htm) that explains the issue, and provides info as to the shipping charges. At least this provides an obvious disclaimer, so I feel I'm covered. Not ideal, but good enough for now until I get to figuring out the cart program.
Cheers & all the best,
Kevin