How to generate a new product template in Shopify
After following the previous post to hide the add to cart button, a new product template for that product is indispensable. Hence, this post will show you how to generate a new product template. Here is the detail.
Table of content
Generate a new product template in Narrative themes
Step 1: Go to Themes
Firstly, log in your Shopify account. Afterward, go to Online Store
and click on the Themes
button.
Step 2: Select Edit code
You will see a list of themes. Select the one you want to edit by tapping on Actions
and choose Edit code
in the drop-down list.
Step 3: Press on Add a new template
Look at the Templates
directory, make sure to press on Add a new template
.
Step 4: Create the new product template
In this step, choose the product
first. Then, name your new template ` requires-contact. Tap on
Create template` to complete.
Step 5: Replace the code
You need to find the code:
{% section 'product-template' %}
Afterward, you will replace it with the following code:
{% section 'product-template-requires-contact' %}
This code is to link your new template with a new product section that you will create following the post named how to generate a new product section.
Step 6: Save
To finish, tap on Save
.
Generate a new product template in other themes
Step 1: Go to Themes
First of all, log in your account to access the admin page. Next, tap on Online Store
and select the Themes
button.
Step 2: Choose Edit code
Find one theme in a list of themes and click on Actions
next to it. Then, tap on the Edit code
button which is marked in the image below.
Step 3: Tap on Add a new template
Look for the Templates
directory. Then, make sure to tap on Add a new template
.
Step 4: Create the new product template
In this step, choose the product
first. Then, name your new template requires-contact
. Tap on Create template
to complete.
Step 5: Replace the code
You need to find the code:
{% section 'product-template' %}
Afterward, you will replace it with the following code:
{% section 'product-template-requires-contact' %}
This code is to link your new template with a new product section that you will create following the post named how to generate a new product section.
Step 6: Save
Click Save
and a new product template made by you will be created successfully.
Summary:
In a nutshell, this writing takes you through how to generate a new product template. With the detailed steps and illustrate images, the post makes it easier for you to carry out. Hope you find some benefits from this. As I mentioned in the guide, you will create a new product section to link your new template with. Therefore, I’ve prepared this post to help you.