[PHP] Shipping problem...

2002-10-15 Thread Steve Jackson

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
[EMAIL PROTECTED]
Mobile +358 50 343 5159


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Shipping problem...

2002-10-15 Thread Jason Wong

On Tuesday 15 October 2002 15:35, Steve Jackson wrote:
 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.

Perhaps I don't understand you properly -- why you need two categories? How is 
shipping charge calculated? 


Do you just have two rates (which your 1st paragraph seems to imply) -- ie If 
the total weight of products is under 10KG charge $5, otherwise charge $10? 
...

 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) 

... In which case, yes a simple if statement would suffice.

 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) 

Perhaps if you post your code and your db schema here then someone may be able 
to help.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
God is a comedian playing to an audience too afraid to laugh.
- Voltaire
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Shipping problem...

2002-10-15 Thread Tim Monaghan

 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.

That sounds like the best idea to me, whats the  big you had?

Tim

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Custom Programming
Web Programming community  discussion
http://www.inter-apps.com



- Original Message - 
From: Steve Jackson [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Tuesday, October 15, 2002 2:35 AM
Subject: [PHP] Shipping problem...


 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
 [EMAIL PROTECTED]
 Mobile +358 50 343 5159
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Shipping problem...

2002-10-15 Thread Tim Monaghan

hehe I meant to say BUG ;)

 That sounds like the best idea to me, whats the  big you had?

 Tim

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Custom Programming
 Web Programming community  discussion
 http://www.inter-apps.com



 - Original Message -
 From: Steve Jackson [EMAIL PROTECTED]
 To: PHP General [EMAIL PROTECTED]
 Sent: Tuesday, October 15, 2002 2:35 AM
 Subject: [PHP] Shipping problem...


  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
  [EMAIL PROTECTED]
  Mobile +358 50 343 5159
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php