LogoLogo
search
Ctrlk
Contact API support
  • Build apps
  • Site Templates
  • REST API Reference
  • Storefronts (JS API)
  • Webhook automations
  • Discounts
  • Guides
  • Changelog
  • REST API
    • REST API overview
    • REST API error codes
    • Store Profilechevron-right
    • Orderschevron-right
    • Productschevron-right
    • Categorieschevron-right
    • Customerschevron-right
    • Discountschevron-right
    • Domainschevron-right
    • Dictionarieschevron-right
    • Staff accountschevron-right
    • Applicationchevron-right
    • Batch requestschevron-right
    • Shipping optionschevron-right
    • Payment optionschevron-right
    • Checkout extra fieldschevron-right
    • Storefront widget detailschevron-right
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 7 months ago

Was this helpful?

Lightspeed® 2025

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

Was this helpful?