Light Mode
Quick Add
The quickAdd
endpoint enables the customer to add a product directly from the products list to the cart without the need to open that product page. Under the hood, this endpoint calls the addItem
endpoint by passing the id of the product which will be added to the cart.
:::tip
The quick add endpoint has been implemented in the Add Product Web Component, and it's ready for use.
:::
Payload
Response
Usage
To perform the action of adding a product into the cart, the developer may call the method quickAdd
as follows:
salla.cart.quickAdd({ id: 12345 }).then((response) => {
/* add your code here */
});
// TIP: short version
salla.cart.quickAdd(12345).then((response) => {
/* add your code here */
});
Events
This endpoint calls the addItem
endpoint by passing the id of the product which will be added to the cart. Accordingly, all of the addItem's events are applicable.
Last modified: 2 months ago
Payload
Response
Usage
Events