Chapter    10

Shopping Bag

At this point, if you followed along, you have a registered user who is ready to add products into his or her shopping bag. In this chapter, I show you how to add a product to the shopping bag, update the product’s quantity, delete an individual product or all of them from the bag, and update the total amount. The customer should be able to see what’s in the bag when he or she returns to it.

Shopping Bag Model

First, the model to represent an item in a shopping bag: create a PFObject subclass, and name it EMABOrderItem. Then register this class name with EMABConstant by giving it an NSString key: kOrderItem. This subclass has two properties: one is the quantity, and the other is an EMABProduct instance. Also create ...

Get iOS eCommerce App Development with Parse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.