This addItem
endpoint adds an item from the merchant's store to the customer's shopping cart. The customer may select the item, type in the quantity he wants to order, and click on the "add to cart" button. This sends the product to the shopping cart, and then the customer may continue to shop for other items.The add item endpoint has been implemented in the Add Product Web Component, and it's ready for use. Payload#
Response#
Usage#
The method addItem
adds an item into the cart, the developer may call the method addItem
as follows:Simple Product#
Variable product#
Events#
This endpoint may trigger two events, the onItemAdded and onItemAddedFailed events.onItemAdded#
This event is triggered when adding an item to the cart is done without having any errors coming back from the backend.onItemAddedFailed#
This event is triggered when adding an item to the cart is not completed and an error has occurred. For example, the id of the product to be added to the cart was not found. 
扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

扫码加入交流群Modified at 2025-02-20 07:53:20