Product Interaction Template Format

You can display product recommendation in interaction campaigns, using a custom format for the template.

Note that this is not product recommendations widget template, which you can read more about here.

For more info on classic interaction template format read more here.

PRODUCT TEMPLATE

Interaction templates could contain products:

  • currently there are 2 algorithms available to retrieve products into these templates: “products from cart” and “viewed products

In order to display products please select one of the those options from the settings panel (inside interaction editor).

The template should contain product tags, very similar to merchandising templates. You have two options:

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.

 

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.price|** Product price – use to display product price

**|product.discountPrice|** Product discount price – use to display product discount price (if exists)

If you have more attributes added from product feed configuration, feel free to use them.

Template 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 %}

Related Articles