Actions
Quick start
window.addEventListener('lce:actions.client_ready', () => {
window.LiquidCommerce.elements.actions.cart.openCart();
});Product actions
actions.product.getDetails(identifier)
actions.product.getDetails(identifier)const product = window.LiquidCommerce.elements.actions.product.getDetails('00619947000020');
console.log(product.name, product.price / 100);Cart actions
actions.cart.openCart()
actions.cart.openCart()actions.cart.closeCart()
actions.cart.closeCart()actions.cart.toggleCart()
actions.cart.toggleCart()actions.cart.addProduct(params[], openCart?)
actions.cart.addProduct(params[], openCart?)actions.cart.applyPromoCode(promoCode)
actions.cart.applyPromoCode(promoCode)actions.cart.removePromoCode()
actions.cart.removePromoCode()actions.cart.resetCart()
actions.cart.resetCart()actions.cart.getDetails()
actions.cart.getDetails()Checkout actions
actions.checkout.openCheckout()
actions.checkout.openCheckout()actions.checkout.closeCheckout()
actions.checkout.closeCheckout()actions.checkout.toggleCheckout()
actions.checkout.toggleCheckout()actions.checkout.exitCheckout()
actions.checkout.exitCheckout()actions.checkout.addProduct(params[], openCheckout?)
actions.checkout.addProduct(params[], openCheckout?)actions.checkout.applyPromoCode(promoCode)
actions.checkout.applyPromoCode(promoCode)actions.checkout.removePromoCode()
actions.checkout.removePromoCode()actions.checkout.applyGiftCard(code)
actions.checkout.applyGiftCard(code)actions.checkout.removeGiftCard(code)
actions.checkout.removeGiftCard(code)actions.checkout.toggleIsGift(active?)
actions.checkout.toggleIsGift(active?)actions.checkout.toggleBillingSameAsShipping(active?)
actions.checkout.toggleBillingSameAsShipping(active?)actions.checkout.toggleMarketingPreferences(field, active)
actions.checkout.toggleMarketingPreferences(field, active)actions.checkout.updateCustomerInfo(fields)
actions.checkout.updateCustomerInfo(fields)actions.checkout.updateBillingInfo(fields)
actions.checkout.updateBillingInfo(fields)actions.checkout.updateGiftInfo(fields)
actions.checkout.updateGiftInfo(fields)actions.checkout.getDetails()
actions.checkout.getDetails()Address actions
actions.address.setAddressByPlacesId(placesId)
actions.address.setAddressByPlacesId(placesId)actions.address.setAddressManually(address, coordinates)
actions.address.setAddressManually(address, coordinates)actions.address.getDetails()
actions.address.getDetails()actions.address.clear()
actions.address.clear()UI helpers (non-actions)
Last updated

