May 2018
Beginner to intermediate
526 pages
11h 57m
English
We need to create a simple structure that can be serialized to JSON for storing cart items in a session. The cart has to include the following data for each item contained in it:
Since product prices may vary, we take the approach of storing the product's price along with the product itself when it's added to the cart. By doing so, we use the current price of the product when users add it to their cart, no matter if the product's price is changed afterwards.
Now, you have to build functionality to create carts and associate them with sessions. The shopping cart has to work as follows:
Read now
Unlock full access