Think about it.
Its whole the game of session or cookie. There is a basket called shopping cart which holds the info about what you have purchased or what you are planning for the purchase. The whole thing will be managed by either session or cookie which holds the information until you log out
go here to learn more
http://www.wellho.net/solutions/php-shopping-cart-application-in-php.html
I hope this information will help you to understand the concepts of shopping cart
Jan 13, 2011