Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Add an Item to a Cart

Add an Item to a Cart

An item is a purchasable good, like a T-Shirt, a movie, a song, etc, while a item definition is the description of the item. For more information on items and item definitions, see Items Explained.

Workflow for adding an item to a cart:

  1. GET - an item
  2. GET the item's addtocartform
  3. POST the item to a Cart's addtodefaultcartaction

post_item_to_cart