ShoppingCart
Class representing the snabble shopping cart
Types
Properties
The last time the cart was backed up by using .backup
Gets a list of invalid products that were rejected by the backend.
Returns true of the carts price is calculated by the backend
Check if the cart is backed up by .backup and still in the 5 minute time window
Returns the current minimum age required to purchase all items of the shopping cart
Returns the total sum of deposit
Returns the total price of the cart.
The quantity of items in the cart.
Functions
Add a item to the cart
Adds coupons without adding a scanned code to it, you can use this function to quickly add DIGITAL coupons that do not have a barcode associated with them
Adds coupons with a scanned code to it, you can use this function to quickly add PRINTED coupons
Adds a ShoppingCartListener to the list of listeners if it does not already exist.
Clears the backup storage of the cart
Checks if the provided scanned code is contained inside the shopping cart
Generate a new uuid.
Gets the cart item a specific index
Find a cart item by it's id
Returns a cart item that contains the given product, if that cart item can be merged.
Returns true if the shopping cart is over the current set limit
Returns true if the shopping cart is over the current set limit for online checkouts
Gets the current index of a cart item
Insert a cart item into the shopping cart at a specific index
Clears the cart and generated a cart new session.
Resets the cart to the state before it was updated by the backend
Create a new cart item using a line item of a checkout info
Create a new cart item using a product and a scanned code
Create a new cart item using a coupon and a scanned code
Removes a given ShoppingCartListener from the list of listeners.
Remove the handled ViolationNotifications.
Update all prices of the cart
Updates each items products in the shopping cart