Implementation of Viabill Pricetags on websites
To get viabill pricetags on your webshop, you need to insert a few code snippets.
- DIV elements used as a container for the actual pricetag (typically placed below the price of the item).
TIP You can open the file with notepad, if you do not have an editor for viewing source code.In the code there find the following line of code:
|data-view||Indicate pricetag type|
|data-price||10,00 , 10.00||Indicate price with a “,” or a “.”|
|data-dynamic-price||Query selector||A Query selector for the element that contains the price of the product.|
|data-dynamic-price-triggers||Query selector||If the price is variable then it is possible to trigger an vb-update-price event.|
<div class='viabill-pricetag' data-view='product' data-price='42'></div>A pricetag with dynamic attributes could look like this:
<div class='viabill-pricetag' data-view="list" data-dynamic-price=".productpreview|.price" data-dynamic-price-triggers="#webshop_content .filters input"></div>The two DIV elements above will yield a pricetag which look like this:To get one of the below pricetags, change the data-view attribute on the DIV element.