Forum Moderators: coopster

Message Too Old, No Replies

Related Products & Accessory Products

For a PHP shopping cart.

         

wfernley

1:23 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey everyone :)

I was curious how to build a section on my site that has related and accessory products. Basically when they are viewing a product there is a little section where it says "Here are some related products" and "here are some products we recommend buying with this product". I was curious what the best way is to do this.

I was thinking that having a table in my DB called related_products where it has a column for the product id, and a column for the related product id numbers. Would this be the best way? Or, should I just have a column in my products table where its called related products and there I have a list of ids which I seperate into an array.

How have many of you designed this function?

Thanks for you help :)

coopster

8:47 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If you are asking for advice on which option to go with, I'm for option number one, "...a table in my DB called related_products where it has a column for the product id, and a column for the related product id numbers." The second option is really going to limit you, especially when it comes time to query the database. My two cents ;-)

Side note: Maybe you could pull down a popular open source software package to see how they did it, maybe you'll find some good direction there...?