If you have product data in your database and you want to automate the operation of the BUY.BOX widget, you can sew up the script in your website template. 

Step 1 

Insert the below code in the <head>  section on all subpages where you will use the BUY.BOX widget.

<script src="https://buybox.click/js/bb-loader.min.js" defer></script>

Step 2 

Place the following code where you want to display the BUY.BOX widget  

<div class="bb-widget" id="buybox-1" data-bb-id="{buybox-id}" {par}="{wartość}"></div>

   where:  

  • {buybox-id}  - the unique ID of the widget to be downloaded from the publisher's panel
  • {par}  - parameter describing the product or configuration (description below)
  • {value}  - value of the parameter describing the product or configuration

Parameters 

  • data-bb-number - GTIN code of a product (e.g.. ISBN orEAN)
  • data-bb-name  – name of the product
  • data-bb-info  – additional attribute describing the product (description below)
  • data-bb-abpar1 , data-bb-abpar2 , data-bb-abpar3 - Abpar parameters
  • data-bb-skip_jQuery - disable downloading the jQuery library; value 1 disables the download
  • data-bb-alt - container ID with alternative content (description below) 

Additional attributes for particular categories  

  • Books – name and surname of the author 
  • Films- name and surname of the director 
  • Music – a performer

Examples:

Searching for products by GTIN

<div class="bb-widget" id="buybox-1" data-bb-id="691" data-bb-number="0309975410082" data-bb-skip_jquery="1"></div>

Search for products by name and additional attribute

<div class="bb-widget" id="buybox-1" data-bb-id="691" data-bb-name="Zero To One" data-bb-info="Thiel Peter" data-bb-skip_jquery="1"></div>


Alternative content
 

 If you want to display alternative content (e.g. a banner) at the moment when the widget will not display any offers.

<div class="bb-widget" id="buybox-1" data-bb-id="691" data-bb-number="0309975410082" data-bb-alt="no-buybox"></div>
<div id="no-buybox" style="display: none;">
<!-- Tutaj wstaw alternatywną treść -->
</div>


Several BUY.BOXes on one page
 

If you want to insert multiple widgets into one sub-page, all you need to do is set an individual container ID for each widget.

<div class="bb-widget" id="buybox-1" data-bb-id="691" data-bb-number="0309975410082" data-bb-skip_jquery="1"></div>
...
<div class="bb-widget" id="buybox-2" data-bb-id="691" data-bb-number="0604214271906" data-bb-skip_jquery="1"></div>
Czy udało Ci się znaleźć odpowiedź na swoje pytanie?