Custom template data

Use the custom template data option to determine certain elements at product level in your online store. It will enable you to add additional functionality to your product pages and the product type category.

If this option is visible at CATALOG> Products> Product > General tab, you can enable the custom template data at GENERAL> Settings> Workflow.

Note: To do this, in-depth knowledge of HTML and CSS is essential. If you do not possess it, we recommend hiring an expert instead of proceeding on your own. Also, if you activate the Template Editor, you will no longer receives template updates.

How does it work?

If you want to use custom template data fields, use the code listed below in the Template Editor, which can be found by navigating to GENERAL > Design > General > Template Editor in the left menu of the back office:

{% if product.data_01 == 'link term' %}

When the data _01 line is filled, the HTML code that should be written here will be evoked.

{% else %}

When the data _01 line is not filled, the HTML code that should be written here will be evoked (often the original code)

{% endif %}

In short, you are creating a IF THEN/ELSE conditional code section here. If the data_01 line for a given product is filled, the code in the THEN section will be used, otherwise the code in the THEN section. You can basically use these codes for almost any kind of purpose on the product pages in your online store.

Note: The data_01 field is active across your entire website, the data_02 and data_03 fields solely operate on product level. Data_0x fields are always associated with products.

Example

You want to write HTML/CSS code to display a New label over the images of new products in your online store. This will enable you to determine at product level when this code should be evoked.

Your code will look like this:

{% if product.data_01 == 'New' %}
  • insert the HTML code here that will display a New label over the images of new products
{% else %}
  • original code, which will be evoked when the data_01 field is left blank
{% endif %}

In short, you are creating a IF THEN/ELSE conditional code section here. If the data_01 field for a given product contains the term New, the HTML code listed in the THEN section will be applied at product level. New is the link term used to link the product in question to a specific HTML code.

Note: Is the above beyond you and does it sound like overly complicated math? If so, hire an expert if you want to use custom template data fields.
Have more questions? Submit a request