Jump to content

Shopping Cart with Combo Deals


barkster

Recommended Posts

I was asked to develop a shopping cart that would the creation of combo deals using existing products to build the combo. What I need to have happen is when a combo is added to the cart and purchased the individual products that combine to make the combo need to individually deducted from the inventory. Where I'm having difficulties is coming up with a way to get the combos into the cart because right now they are a separate table from the products table and I'm not sure if I'm going about this the right way. Here is a diagram of my tables and a link to a demo of the inventory system. Any suggestions on how to do this to work with a cart or get the combos into the products table and making it work?

 

http://69.65.102.98/~lightfli/produc...hp?productid=5

 

Products Table

 

product_id | name | price

==================

1 | motor | 2.20

2 | engine | 22.12

3 | prop | 4.00

2 | prop2 | 4.60

7 | mount | 8.00

 

Package_Map Table

 

product_id | package_id

==================

1 | 1

2 | 1

3 | 1

2 | 2

7 | 2

 

Packages Table

 

package_id | name | price | product_id

==================

1 | Premium Combo | 200.12 | 2

2 | Basic Combo | 140.21 | 2

3 | Basic Combo | 122.32 | 1

Link to comment
https://forums.phpfreaks.com/topic/96918-shopping-cart-with-combo-deals/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.