Shopalyst Buy it Now Integration



Introduction:


The Shopalyst Buy it Now [BIN] widget is a simple to use plug and play library to enable rich shoppable experiences on your website. The BIN widget offers a rich API to customise the widget to fit your website and branding to create seamless and beautiful integration into your existing website.


To get the BIN widget on your website, drop a note to our team and we will get back to you.




Getting Started:


To get started, you will need the following information which should have been provided to you by the Shopalyst team. (If you don't have this information, please  Raise a Request)

  1. publisherId: The unique publisher handle
  2. placementId: The unique placement identifier
  3. campaignId: The unique campaign identifier

Once you have this information, you are ready to setup your page. Enter the details below to see the integration guide:

Initialization

<!-- Initialize Shopalyst properties in the _shopalyst namespace before including the cartmgr script -->
<script>
  var _shopalyst = {
      pub: 'milkmaid', // The publisher ID 
      pl: 188801, // The placement ID
      cm: 188801, // The Campaign ID
      consent: false // A boolean indicating whether the user has consented to our use of cookies
  };
</script>

<!-- Include Shopalyst cart manager script for the desired region -->
<script src="https://ncc.shortlyst.com/v2/js/cartmgr.min.js"></script>

<!-- If the Shopalyst parameters were not initialized before adding the script, the initialisation -->
<!-- can be done using the `_shopalyst.init()` method after the script has loaded-->
<script>
  _shopalyst.init('milkmaid', // The publisher ID 
                  188801, // The placement ID
                  188801, // The Campaign ID
                  false // A boolean indicating whether the user has consented to our use of cookies
                )
</script>

Invoking Widgets

  
<!-- Invoke the widget by passing an ean code and other options -->
<script>

_shopalyst.openBrandstore();

// To open the BrandStore widget on the click of a button, invoke it in the click handler of the desired element
button.addEventListener('click',function(){
    _shopalyst.openBrandstore();
});
</script>