Hi,
I want to make a shopping cart, but I don't know how to store the shopping basket. Should I use sessions only or use both of sessions and database to store it? Because somebody said it spends lot of resource if using sessions only.
If customer adds three products in basket and I use both of sessions and database, is the database structure like this?
======================================
| id | sessionid | product | quantity |
| 1 | f4cb5cb468fb51fb75c1fdd2f | dc | 1 |
| 2 | f4cb5cb468fb51fb75c1fdd2f | book | 5 |
| 3 | f4cb5cb468fb51fb75c1fdd2f | cd | 3 |
Please correct my concept. Thanks!