| alwaysabitlost 2004-08-05, 11:14 pm |
| Hi Guys
I'm trying to add a feature to my shopping cart. In the right hand column of
the screen are "New items", which pulls out all the latest products, "Similar
items", which pulls out items from the same category as the item the user is
currently viewing, and finally "Complimentary items", which is where I'm
getting unstuck.
What I'm trying to do is to get some code to look at the basket/cart table,
(which holds the users session, quantity, product id number and it's
"category" and the date they added it,)
pick out all the users items,
grab hold of the cat_ids for each of these items,
then use those to query the database again and say "find items in the same
categories, but don't pull up any items that the user already has in his or her
basket."
Anyone got any ideas?
Thanks
|