I had a similar problem, when my "range" was out of range for shipping.
For instance, I had defined weight ranges 1-2, 2-3, 3-4... 9-10, and then had an order come in at 12. The system didn't like it much.
What about a system that really uses "rules", such that:
order charge $6.00 as a minimum shpping/order charge, then allows you to set ranges:
<=2, 0 ## no additional shipping up to 2 pounds
2-5, 3 ## $3 more for up 2 - 5 lbs (the previous rule applied first grabs the 2 pounds value at $0, anything over 2 lbs moves to this rule.
>5, 1* ## over 5 pounds, add $1 per pound.
Also, as mentioned in an email, storing a shipping "price" and a "weight" with each item allows (or would allow) the system to [eventually] chose between weight or price calculations. When you toggle the weight/price button, it's not always logical what may/might happen.
I realize this is meant to be light weight, but sometimes the most complicated things happen when you try to make things simple <G>
This post shows only a _SUBSET_ of the fields from my original "items" table <G>
http://www.gossamer-threads.com/...orum.cgi?post=207980 I really wished I wasn't talking to myself in that thread, since trying to work out these concepts/logic is really hard, yet, once done, the programming goes together much more easily.
I'm in a quagmire at the moment -- one site I'm making the logo program work with the upload/thumbnail code from the multiupPro program which I'm trying to get working on another site, so I can add photos into the shopping cart, so I can get enough information into the link that I can start attaching "Items" to each link...... my head's going to crack open.
Shipping calculations are a whole module/process in themselves.
One way to handle it, is to add a field to the Item/Order line, shipping_cost_this, or something that makes more sense <G>. What that field is, is what the cost to ship that item is for THAT/THIS order. When added to the shopping cart, it looks at the type of order, other items, shipping rules, etc and works out a shipping price. When orders are recalculated, the same thing happens. There is a potential to get into problems, but if the rules also include "grouping", then if item A ships with item B for a group price, the recalculation groups those items, and then moves on to the next item. (in other words, it doesn't simply move item by item without grouping, assortability, discounts, etc).
Once this is calculated, then total shipping is just the sum of the parts.
Doing it this way, an item can have a price override for being a "heavy" item, and shipping by weight, but other items can be figured by price.
This allows tie in to the UPS (or other) shipping module that uses zones, so that you don't have to pre-set a shipping price, but can take the 80 lb price override, and apply the zone calculation, and come up with a price for that item for that order.
I know... complicated, but eventually inevitable, none the less <G>
PUGDOG� Enterprises, Inc. The best way to contact me is to
NOT use Email.
Please leave a PM here.