How to Create a New Template

 

Templates determine how a product's attributes will be formatted on the product details page of the shopping session. Display templates recognize attributes by their attribute characteristics (displayable, open line item, etc). If a totally new characteristic is introduced, a new display template will need to be created.

Templates are created using velocity macros (VMs). VMs can accommodate java script but not java. There are 6 default display templates in your system when you purchase Agilis AMS.  

To Create a New Template:

  1. Scroll down to the “Template Configuration” section at bottom of the Attributes screen.

  2. Click Create.

  3. Enter the template name and click Add Template.

  4. The new template will have a filename in brackets after it such as (1.vm). You must now create a corresponding Velocity template in the application server’s file system in /WEB-INF/templates/velocity/store with that same filename. If you do not know how to create a Velocity template, you can copy other templates. 1.vm is the default category template and 2.vm is the default product template. So, for example, you can copy 2.vm to 3.vm if you have created a new template which has (3.vm) after the template name. Then you can customize this 3.vm template to suit your needs.

  5. In order to be able to associate the template to a category or product, you must first attach it to a category or product attribute group. You can now associate this new template to the appropriate attribute group.

  6. Now you can use this template to display a specific category or product in the Product Catalog Manager. You will need to choose the category or product to apply the template to, then choose an attribute group which contains that template, and finally choose the template. All of this is done on either the Category Overview or Product Overview screen, depending on which type of product catalog object you’re applying the template to.