[ic] Add weight to shipping

Ed LaFrance interchange-users@interchange.redhat.com
Sun Feb 24 11:14:01 2002


At 12:59 PM 2/24/2002 +0100, you wrote:
>Hello
>
>I have created a new shipping method based on the Post Office rates, that
>is, shipping by weight.
>
>To the resulting rate I have to add a fixed amount which covers the
>packaging.
>
>No problem for this.  It can be done.
>
>However I would also likte to add a fixed weight which covers the package
>weight.  With this I mean that if I receive an order for a product that
>weighs 990 grams, the shipping charges to any European country, according to
>the post office rates, would be 6,95 Euro.  And this is the amount
>Interchange will calculate.
>
>However, since I have to add an "envelope", total shipping weight might be
>around 1090 grams.  This means that the real rate charged by the Post Office
>(for weights in excess of 1000 grams) would be 10,25 Euro.
>
>Therefore a fixed weight of, say, 100 grams, should be added to each order
>(not to each item, as in a single order, several items could be dispatched).
>
>How to go about this?  I have searched and found no way to do this while at
>the same time adding a fixed money amount to each order.
>
>Regards,
>
>Francisco

Hmmm... I understand why just slapping a monetary charge onto this would 
not work - you need to add the actual weight of the packaging to the order 
weight and then get a shipping amount for the new total weight.  I'm not 
sure if there is any way to explicitly add to accumulated criteria like 
weight in the shipping table.

Briefly, two things come to mind:

1. You could push a 'packaging' item into the cart a checkout, which costs 
0 but weighs 100 grams.  This could be done with Perl on the checkout page, 
or using the [add-item] usertag I wrote a while ago (it is floating around 
in the list archives somewhere). You would want to modify the checkout page 
so that the user cannot remove this 'item', and that every time they go to 
checkout is it added if not already present in the cart.

2. You can tally the weight with your own code on the checkout page, then 
add 100 grams, and use the final total as the criterion in your shipping 
file, instead of the current method of having the shipping routines tally 
the weight.

I'll watch this thread if you decide to approach it one of these ways and 
are looking for some code examples. Meanwhile, maybe someone else knows of 
an existing Interchange mechanism for doing this...

- Ed L.



===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================