Wix with ecwid Installation Guide

Important

The "AUTO DETECT PRICES" option must be selected in Step 1 (selected by default).

Add wix.ecwid.com to your allowed domains list.

Step 3. Pasting the Installation String into your website.

Under 'Step 2. - Installation String', on the Dynamic Converter Settings page in the text box, you will see the Installation String for yoursite. That Installation String now needs to be added to your web site pages.

  1. Right click on the Ecwid app in your Wix editor
  2. Click on App settings.
  3. Click on Design.
  4. Scroll down and click 'Advanced settings'
  5. Paste your installation string and the extra block below
        <script>
    
           function reloadDC(from)
            {
                /** console.log('reload from event ',from); */
                dc_convert_now();
                var spans = document.querySelector('span#convert+span#convert');
                if (spans !== null) spans.remove();
            }
    
            function dcUpdateRecentlyViewed() {
                document.querySelectorAll('a > .recently-viewed__price').forEach(function (elm) {  elm.parentNode.after(elm); });
                reloadDC('Recently-viewed');
            }
    
            var dcObserver = new MutationObserver(function (mutations) {
                mutations.forEach(function (mutation) {
                    reloadDC('price change detection');
                });
            });
    
            function dcSetObserver(page) {
                var nodeToWatch = null;
    
                if (page === 'CART') {
                    nodeToWatch = document.querySelector('div.ec-cart__sidebar-inner');
                }
    
                if (page === 'PRODUCT') {
                    nodeToWatch = document.querySelector('span.details-product-price__value');
                    setTimeout(dcUpdateRecentlyViewed,500);
                }
    
                if (nodeToWatch !== null)
                {
                    dcObserver.observe(nodeToWatch, {characterData: true, subtree: true});
                }
            }
    
            Ecwid.OnPageLoaded.add(function (page) {
                reloadDC('loaded');
                dcSetObserver(page.type);
            });
    
            Ecwid.OnPageLoad.add(function (page) {
                dcObserver.disconnect();
            });
        </script>
    
      
  6. And 'Save'

Installation Complete.

 

 


;