You can display product recommendations in any onsite campaigns, using a custom format for the template.
For more info on content html templates read more here.
When you add a new campaign variation to any campaign, you have the option to use the visual editor.
In order to use it, you have to choose what type of interaction you want. In this case, you have to choose the “Display product triggers” option.
Product Recommendations Content
You can choose one of our existing popups with product recommendations or you can create one from scratch.
Interaction templates can contain product information:
- product added to cart
- most relevant product for user
- specific product
- from specific category
- advanced
By selecting any of these options, your template will include product information.
By default there is only 1 product returned from the recommender engine. To display product data:
Put all html into the specific loop:
{% for product in products.pos01 %}
<div> product information </div>
{% endfor %}
Use vtproduct attribute
Use vtproduct="pos01"
as html attribute and we will add the loop inside this tag.
<ul vtproduct="pos01">
<li reccs-item>
</ul>
Product dynamic tags
Use product tags to display item related information:
**|product.title|** Title of the product
**|product.url|** Url of the product – use for links
**|product.image|** Url of the product image – use to display product image
**|product.discount|** Percentage of the discount (calculated automated.
**|product.final_price|** Product price – use to display current product price
**|product.old_price|** Product old price – use to display product original price (if it’s on sale)
If you have more attributes added from product feed configuration, feel free to use them using the following dynamic tag: **|product.attribute_name|** where attribute_name is the name of the attribute.
Conditional tags:
You can use logic inside the template as the following example:
{% if loop.index0 is divisibleby 3 %} SOME HTML {% endif %}
{% if product.discountPrice %} SOME HTML {% endif %}