Basket
Commands
open
open
Opens the basket.
close
close
Closes the basket.
getState
getState
Gets the current state of the basket.
The command will return an object with the following properties:
addProduct
addProduct
Adds a product to the basket. The command accepts a single argument, consisting of the properties below:
Below is an example use:
Events
onOpened
onOpened
This subscription will trigger every time the basket is opened.
onClosed
onClosed
This subscription will trigger every time the basket is closed.
onToggled
onToggled
This subscription will trigger every time the basket is toggled between open and closed state.
onProductAdd
onProductAdd
This subscription will trigger whenever a product is added to the basket.
Note:
Products added through the addProduct
API command will not trigger this subscription.
The callback contains a value/result of the product that was added, containing the following properties:
Note:
Please note that pageIndex
starts at 0
. So the 1st page of your flipbook will have a pageIndex
of 0
, page 2 a pageIndex
of 1
and so on. To get the actual pagenumber you should use originPage
instead.
Last updated