This support article will discuss how product templates work and how to create a new Product Template.
If you create a new Product Type, you will be asked to select a Product Template. By default, there are two product templates: Product and Wholesale Grid Ordering. Go to Catalog -> Configuration -> Product Types. Then, click on the orange Create Product Type button.
Here you will notice the Product Template default options.
If a new Product Template is required, go to Content -> Configuration -> Page Templates. Then, click on the orange Create Page Template button.
Here you will notice, there are multiple Template Types to select. For this example, we will create a Product Template Type. Also, notice the File field is required.
The file that is required for this field is a file with a .flex extension. FLEX is the programming language used by Lead Commerce. For more information on the FLEX programming language, see FLEX Overview. If you'd like help in this area, please contact our Sales Team at email@example.com and we can connect you with one of our partners.
To create the .flex file, go to Content -> Configuration -> Theme Editor. Then, click on the green Create File button.
By default, the .flex file extension is already selected. You will enter your file name and select your Template Type. Again, for this example we are creating a Product Template Type and we entered the Name: Product2. The name must be unique. Once in the Theme Editor look under the Default Theme directory structure and make sure your file name is not already listed in the flex folder. After entering your unique file name, click on the Save and Close button. Now you should see your newly created file in the Default Theme directory structure in the flex folder.
Notice, that the product2.flex file was created and is now open.
Now we can go back and create our Page Template with the Template Type of Product. So, let's go back to Content -> Configuration -> Page Template and enter our data. We have entered the Template Type as Product, the name as Outdoor Products and the File as products2.flex. Click here for more information on Page Templates.
Notice that our Page Template has been created.
Now, we can go create a new Product Type with a new Product Template. Go back to Catalog -> Configuration -> Product Type. And, select Create Product Type. Then, enter the desired name and for Product Template select the newly created Product Page Template.