LogoLogo
search
⌘Ctrlk
Contact API support
  • Build apps
  • Site Themes
  • REST API Reference
  • Storefronts (JS API)
  • Webhook automations
  • Discounts
  • Guides
  • Changelog
LogoLogo
  • REST API
    • 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
block-quoteOn this pagechevron-down
  1. Advanced

JS API calls

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

hashtag
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()

hashtag
Storefront and customers

Ecwid.getOwnerId()

Ecwid.getStorefrontLang()

Ecwid.formatCurrency()

Ecwid.getVisitorLocation()

Ecwid.Customer.get()

Ecwid.Customer.signout()

Ecwid.getTrackingConsent()

Ecwid.setTrackingConsent()

Ecwid.openPage()

hashtag
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 9 months ago

Was this helpful?

Lightspeed® 2025

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

Was this helpful?