Cart
This functionality is advanced. We recommend that most users utilize the ready made modules to simplify and speed up development. The cart module can be found here.
Example:
Buddi.getCart();
Caching: 60 mins
Events: cart:loaded, cart:loading-error, cart:updated
Returns:
{
allTaxes: {...},
appliedBagFee: null,
appliedRewards: [],
bagFeeTaxes: [],
bagFees: [],
deliveryFee: null,
deliveryFeeTaxes: [],
directMailFee: null,
directMailFeeTaxes: [],
discountCode: null,
items: {...},
loyaltyWallet: null,
rewardTotals: [],
subtotal: 110.99,
taxes: {...},
tip: null,
total: 126.42,
totalWithDelivery: 126.42,
totalWithExpressDelivery: 126.42,
weight: 6
}