DanDomain Installation Guide

DanDomain Installation Guide

Installing the helloretail partner JavaScript

Log in to the admin part of your DanDomain webshop. Navigate to Indstillinger > Site. Click the small edit icon ("Rediger") – next to the webshop you want to add the JavaScript to: 
 

Now paste your helloretail partner JavaScript and cart tracking into the bottom of the Kodefelt (head section) field: 
  

<script type="text/javascript">
    (function() {
        var aws = document.createElement('script');
        aws.type = 'text/javascript';
        if (typeof(aws.async) != "undefined") { aws.async = true; }
        aws.src = (window.location.protocol == 'https:' ? 'https://d1pna5l3xsntoj.cloudfront.net' : 'http://cdn.addwish.com') + '/scripts/company/awAddGift.js#YOUR_PARTNER_ID';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(aws, s);
    })();
    _awev=(window._awev||[]);
    _awev.push(["bind", "crawl_completed", function() {
        $.get('/shop/ajaxwrapper.asp?fc=getsessionvaluesJSON', function(basketData) {
            var total = basketData.basketTotalProductPriceWithoutVat + basketData.basketTotalVat;
            if (total > 0) {
                var productNumbers = basketData.basket.map(function(p){
                    return p.productNumber.trim();
                });
                var quantities = basketData.basket.map(function(q){
                    return q.quantity;
                });

                var cartUrl = document.location.origin +
                    '/shop/showbasket.html?AddMultiple=1&ProductID=' +
                    productNumbers.join("|") +
                    '&Amount=' + quantities.join("|");

                ADDWISH_PARTNER_NS.api.cart.setCart({
                total: total,
                url: cartUrl,
                productNumbers: productNumbers
                });
            }
        });
    }]);
</script>

Remember to save your changes.

Important: Once you have pasted it in, you should replace YOUR_PARTNER_ID with your own helloretail partner ID. You can find this by logging into your helloretail admin account.

Make your product data available for helloretail

Here's how to expose product data to helloretail:

  1. Navigate to Indstillinger > Integration - here, choose to add a new user ("Tilføj ny bruger")
     
  2. Fill out the details as shown below and press "Gem" (notat is optional): 
     
  3. Now you will be given an API key. Make sure you copy this, as it will be hidden once you close the window: 
     
  4. As the final step, you'll have to send the API key to helloretail along with your site ID and webshop domain (e.g. my-webshop.com).
    Note: You'll find your site ID by navigating to Indstillinger > Site
     

Make conversion data available to helloretail

Navigate to Design > Tekster/Knapper, then select the page Bestil step 4 (Ordrebekræftelse) 
 

Now add the code below to the field called Kodefelt
 

<span class="addwish-conversion" style="display:none" data-total="[[AdWordsSubTotalInclVAT]]" data-ordernumber="[[OrderID]]" data-email="[[CUSTOMEREMAIL]]"></span>

Remember to Save your changes.

Create a blank search page

Finally, you need to create a blank search page, for the dynamic search feature to use.

  1. Navigate to Design > Egne sider > Opret side
     
  2. Now, create a "Indholdsside" with a relevant name, e.g. "Søgeresultater": 
     

    Remember to Save the page.
  3. Now the page has been saved, scroll down the page to the Parameter section – here you'll find the URL of this new page: 
     

    Please share this new blank search page URL with helloretail, by sending the url to support@helloretail.com. One of the helloretail team will then finalize the setup of dynamic search.
Follow
  • 5 mths agoLast active
  • 136Views
  • 1 Following