LogoLogo
⌘Ctrlk
Contact API support
  • Build apps
  • Site Themes
  • REST API Reference
  • Storefronts (JS API)
  • Webhook automations
  • Discounts
  • Guides
  • Changelog
AI Assistant
Good afternoon

I'm here to help you with the docs.

⌘Ctrli
AI Based on your context
LogoLogo
    • REST API overview
    • REST API error codes
    • Store Profile
    • Orders
    • Products
    • Categories
    • Customers
    • Discounts
    • Domains
    • Dictionaries
    • Staff accounts
    • Application
    • Batch requests
    • Shipping options
    • Payment options
    • Checkout extra fields
    • Storefront widget details
For the complete documentation index, see llms.txt. This page is also available as Markdown.
  1. REST API Reference
  2. Advanced

JS API calls

Check out the Custom JavaScript code and Ecwid JS API article to get started with Ecwid JS API.

Auto event triggers

Ecwid.OnAPILoaded.add()

Ecwid.OnCartChanged.add()

Ecwid.OnConsentChanged.add()

Ecwid.OnOrderPlaced.add()

Ecwid.OnPageLoad.add()

Ecwid.OnPageLoaded.add()

Ecwid.OnPageSwitch.add()

Ecwid.OnSetProfile.add()

onTileLoaded.add()

onTileUnloaded.add()

Storefront and customers

Ecwid.getOwnerId()

Ecwid.getStorefrontLang()

Ecwid.formatCurrency()

Ecwid.getVisitorLocation()

Ecwid.Customer.get()

Ecwid.Customer.signout()

Ecwid.getTrackingConsent()

Ecwid.setTrackingConsent()

Ecwid.openPage()

Cart and checkout

Ecwid.Cart.get()

Ecwid.Cart.addProduct()

Ecwid.Cart.removeProduct()

Ecwid.Cart.removeProducts([])

Ecwid.Cart.clear()

Ecwid.Cart.calculateTotal()

Ecwid.Cart.gotoCheckout()

Ecwid.Cart.canGotoCheckout()

Ecwid.Cart.setOrderComments()

Ecwid.Cart.setCustomerEmail()

Ecwid.Cart.setAddress()

Ecwid.Cart.setBillingAddress()

Last updated 1 year ago

Was this helpful?

Lightspeed® 2025

  • Auto event triggers
  • Storefront and customers
  • Cart and checkout

Was this helpful?