Vote count:
0
I am storing the items of shopping cart into a session array, but since the product ids and quantity is being stored on the client side , I can't perform a check on the quantity of items when a customer wants to add an item whose available quantity is already added to other customers carts.
So I have added a column called added_to_cart in my Products table which increments when a product/item is added to a customers session cart.
Products
-----------------------------------------
: p_id : available_qty : added_to_cart :
-----------------------------------------
: p-123 : 57 : 3 :
-----------------------------------------
: p-287 : 32 : 8 :
-----------------------------------------
asked 36 secs ago
Aucun commentaire:
Enregistrer un commentaire