[lightMode]
Details
This endpoint displays an Cart's details for the customer, The cart's items will be listed here along with their details.
Response
Usage
The details()
method does not receive any parameters. Simply, the developer may call this method and be able to get the customer's order details according to the cart's items.
salla.cart.details().then((response) => {
/* add your code here */
});
Events
This endpoint may trigger two events, the onDetailsFetched and onDetailsNotFetched events.
onDetailsFetched
This event is triggered when fetching the cart's items list is done without having any errors coming back from the backend.
salla.cart.event.onDetailsFetched((response) => {
console.log(response)
});
onDetailsNotFetched
This event is triggered when fetching the cart's items list is not completed and an error has occurred.
salla.cart.event.onDetailsNotFetched((errorMessage) => {
console.log(errorMessage)
});
[updatedIn] 10 months ago
Response
Usage
Events
onDetailsFetched
onDetailsNotFetched