Shipping problem...
| From: | Steve Jackson | Date: | Tue, 15 Oct 2002 07:35:43 +0000 |
| Subject: | Shipping problem... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-119989@lists.php.net to get a copy of this message | ||
Hi all,
I have a problem which I'm not sure the best way to go about. We will be
shipping products based on weight and I have two types of product with
differing weights. Basically we want to charge one price for shipping
less than 10 KG and one for anything over that.
I wonder how to go about it. I have the weights for each product and
have my products organised into two categories in MySQL DB. So anything
in category 1 means less than 30 items is below 10 Kilos and 15 in
category 2.
How would you code this? I have tried adding a weight category to my
products table and calculating total weight (then a simple if statement
would do the trick) but it leads to other problems which I couldn't
de-bug. Basically adding to my products table means my DB won't update
due to a Mysql error (column count didn't match or something) so I can't
do it that way or at least as my shop is currently working I'm scared of
messing with the code too much! I also need to have a combination of the
two products so the customer might buy 1 of category 2 and 35 of cat 1
etc.
Ideas to tackle this please?
Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
stephen.jackson@violasystems.com
Mobile +358 50 343 5159