LogoLogo
Build appsContact API support
Storefronts
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
Storefronts
  • Ecwid storefronts overview
  • Get started
    • Storefront customization options
    • Quickstart: customize storefront with Ecwid JS API
  • Track Storefront events
    • "Page is loaded" events
    • "Customer logged in" event
    • "Cart details are changed" event
    • "New order is placed" event
    • "Instant Site section load" events
  • Get Storefront details
    • Get Ecwid store ID
    • Get storefront language and currency
    • Get visitor location
    • Get public app details
  • Manage customers on the storefront
    • Get logged in customer's details
    • Manage customer's cookie consent
    • Log out customer
  • Open page on the storefront
    • Overview of open page options
    • Open product pages with params
    • Open category pages with params
    • Open search page with params
    • Open account pages with params
  • Manage cart and checkout
    • Get cart details
    • Add product to the cart
    • Remove product from the cart
    • Fully clear the cart
    • Create pre-filled shopping carts
    • Calculate cart details
    • Send customer to the checkout
    • Set customer's email for the checkout
    • Set customer's comments for order
    • Set customer's shipping and billing addresses
    • Set custom order referer
  • Store configuration settings
    • Overview
    • Behavioral configs
    • Design configs

Lightspeed® 2025

On this page
  • Apply configuration with JavaScript code
  • Apply configuration with HTML code

Was this helpful?

  1. Store configuration settings

Overview

Last updated 2 months ago

Was this helpful?

Ecwid offers many configuration settings to change the website's look and feel. You can apply these settings dynamically through the JavaScript code based on specific conditions or set them in the HTML code.

Apply configuration with JavaScript code

With JavaScript code, you can apply configuration settings dynamically.

It grants you more flexibility if you, for example, have several storefronts. However, you need to set up a custom application with a self-hosted JS file. Learn how to set up a JavaScript file in the .

Once set up, use the following code example to set up configuration settings:

Ecwid.OnAPILoaded.add(function() {
    window.ec = window.ec || Object();
    window.ec.config = window.ec.config || Object();
    
    // configs
};

Apply configuration with HTML code

To always apply configuration settings without any JS code, you need access to the website's HTML code.

Search https://app.ecwid.com/script.js to find where Ecwid script is called in the code and add configuration settings inside a <script> block right below it.

Code example:

<div id="my-store-STOREID"></div>
<div>
	<script 
          data-cfasync="false" 
          type="text/javascript" 
          src="https://app.ecwid.com/script.js?STOREID&data_platform=code" 
          charset="utf-8">
  </script>
  <script 
          type="text/javascript"> xProductBrowser("id=my-store-STOREID", "defaultCategoryId=CATEGORYID");
  </script>
</div>

<script>
          window.ec = window.ec || Object();
          window.ec.config = window.ec.config || Object();
          
          //configs
</script>
Quickstart guide