Product templates

Templates for products are maintained within the ~/theme/product directory and their available properties are managed within your Templates JSON Configuration file.

Default template

Themes must include a default ~/theme/product/index.evml template. However, you may add additional Product templates where a store may have different layout requirements for different types of product. Most themes come with just the default template available.


Editable regions

Similarly to Page templates, Product templates support multiple editable regions. However, Product has a reserved editable region:

  • fullDescription
    Represents the Product's "Full Description" content for the page.

You may add any number of additional editable regions to a category template.

Adding editable regions to your template

The <ev:editable> reference guide


EVML objects for products

Each product within Evance will include the following variables in addition to the common global variables.

Product related variables
product Product

Represents a product from the product management system. This object allows you to get access to all settings, assets and properties associated with the product.

Read more about the Product object

recentlyViewed

RecentlyViewed
Pages, categories and products visited are stored within a recently viewed cookie on the visitor's device. This object provides access to recent activity and allows you to show which articles a user recently viewed. 

Read  more about RecentlyViewed

Cookies used by Evance

template Template

May also be access via product.template. Provides access to information about the product page's template settings.

Read more about Template


 

Try the dump() function

If you ever get stuck, or would like to know which variables are available to you, try adding the following code into any template. You will be provided with a list of all variables on the page.

{{ dump() }}

Learn more about debugging