Shopping Cart Session Question
| From: | Boa Constructor | Date: | Tue, 13 May 2003 21:08:28 +0000 |
| Subject: | Shopping Cart Session Question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-27720@lists.php.net to get a copy of this message | ||
Hey all, I'm having a problem with my shopping basket, I know what the
problem is but I'm unsure how to solve it.
I can add items to the cart no problem and it calculates the total no
problem, however when you change the quantity to say "2" then all items in
the cart have a quantity of "2" as this is the last entry for quantity
entered in to the session.
I'm thinking I'm going to have to loop round all the items in the session
and check their quantities, if the quantity in the session has to change
then change it and move on to the next item while making sure any quantities
which are not to change stay equal and so on.
If you want to see how its working at the moment go to:
www.hostmaster-x.co.uk/homepage.html
Any help, advice, tips or tricks welcome.
Cheers,
Graeme :)