x5engine.cart.ui
Contains the helpers used to interface some of the low level classes' methods with the user.
Basically it's a set of UI helpers.
- x5engine.cart.ui
- .addToCart(id, quantity, [option], [suboption], [skipToCart], [basePath]) ⇒
void
- .resumeShopping() ⇒
void
- .updateWidget() ⇒
void
.addToCart(id, quantity, [option], [suboption], [skipToCart], [basePath]) ⇒ void
Add a new element to the cart managing the errors.
If an error occurs, the user in informed via an alert message.
Kind: static method of x5engine.cart.ui
Param | Type | Description |
---|---|---|
id | Number |
The product id |
quantity | Number |
The quantity to add to the cart |
[option] | String |
The option id |
[suboption] | String |
The sub-option id |
[skipToCart] | Bool |
True to skip to cart summary page after adding the product |
[basePath] | String |
The basepath to the document root folder |
.resumeShopping() ⇒ void
Return to the page from which the user got into the cart
Kind: static method of x5engine.cart.ui
.updateWidget() ⇒ void
Called to update the cart widget
Kind: static method of x5engine.cart.ui