Webshop Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wizzard81
Forum Commoner
Posts: 66
Joined: Wed Jan 15, 2003 6:05 am
Location: Belgium
Contact:

Webshop Question

Post by wizzard81 »

Hi

I'm working on a php webshop but i have a question i saw on some sites like this here: http://www.soundsonline.com/sophtml/det ... =TASCD-120

A right column with bundle offers. Does anyone knows how i can program something like this that some products have bundle offers?

Another questions i have is i'm looking for a function to see the most bought products. If someone can helps me?

Cheers
Kris
wizzard81
Forum Commoner
Posts: 66
Joined: Wed Jan 15, 2003 6:05 am
Location: Belgium
Contact:

Post by wizzard81 »

anyone?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

where any how do you store the shopping info?
wizzard81
Forum Commoner
Posts: 66
Joined: Wed Jan 15, 2003 6:05 am
Location: Belgium
Contact:

Post by wizzard81 »

what do you mean.

I store everything in table products, orders
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

Post by puckeye »

You might want to create another table which will hold the product ids of the product you wish to bundle.

Each row in this new table could represent a bulndled product with fields for internal id (autoincrement) bundle id, product id, discount price (and more).

You would then have at least 2 rows for each bundle. It could look like the following:

id = 0 internal id
bundle_id = 0 Bundle id
product_id = 12 Product id
price = 24.95 Price of this product while bundled

id = 1
bundle_id = 0
product_id = 23
price = 22.95

This would produce a bundle (id 0) with 2 products (id 12 and 23) with a bundled price of 47,90$.

Of course there are many more ways to do this but this should give you a few ideas.
Post Reply