O'Reilly logo

iOS eCommerce App Development with Parse by Liangjun Jiang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required