snowboardr
Programmer
I have built a shopping cart, and my client wants to be able to discount shipping depending on what item in the cart.
IE:
Red hat, blue hat, orange hat
If you buy red had and orange hat together you get a x% discount on shipping.
How could I do this to allow 1 product to have unlimited options for this, and calculate it. I really am having trouble thinking of a soultion.
My MySQL database structure is as follows:
shopping table: items in user cart
Thanks for your help in advance.
Jason
IE:
Red hat, blue hat, orange hat
If you buy red had and orange hat together you get a x% discount on shipping.
How could I do this to allow 1 product to have unlimited options for this, and calculate it. I really am having trouble thinking of a soultion.
My MySQL database structure is as follows:
shopping table: items in user cart
Code:
((( pid = product id )))
CREATE TABLE shopping (
sid int(50) unsigned NOT NULL auto_increment,
pid int(30) unsigned default NULL,
qty int(8) unsigned default NULL,
uid int(30) unsigned default NULL,
swhen datetime default NULL,
PRIMARY KEY (sid),
UNIQUE KEY sid (sid)
) TYPE=MyISAM;
Thanks for your help in advance.
Jason