Quote:
I use 2 sessions for this cart :
- $cart = session_register("cart");
- $qty= session_register("qty");
An example :
when a customer choose an item (item code : TS0001) and he buys 3pcs for that items, and then add an item again (item code : TS0002) and he puts 2pcs into the cart.
I wanna add this items to $cart, but, I want the format to be like this :
$cart = ("TS0001 => 3, TS0002 => 2");
yeap, into an array.
Questions :
Quote:
A customer goes shopping for quite long (just say, about 37 munites), after 28 munites, he was surprised because he was logged out automatically (the session expired after 28 munites, and destroy all of it).
The matter is :
The customer can log in again, but..all items in his cart was disapper.
Another matter, everytime he adds items to his cart, I update my stock (stock-qty), so that if the stock <= 0, it will display "SOLD OUT".
If the session like this, it would make a big problem to my database and of course, customer satisfaction.
Can anybody help me for this?