Hello!
I’m working on displaying the “product type” alongside the vendor information on each product page in my Shopify store. I’m using the Dawn theme and have made the following edit to the theme’s product.json file:
“text”: “{{ product.vendor }} | {{ product.type }}”,
However, this modification is causing an error, as it seems the product.type variable isn’t being recognized.
Could anyone assist me in resolving this issue? Any help would be greatly appreciated!
Thanks in advance,
M
Hi @Flamboyance ,
Go to Theme->Edit code, find the file name “main-product.liquid” and add this code anywhere you want.
<div>Vendor: {{ product.vendor }}</div>
<div>Type: {{ product.type }}</div>
For example, I want to add this below the product title:
<div class="product__title" {{ block.shopify_attributes }}>
<h1>{{ product.title | escape }}</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">{{ product.title | escape }}</h2>
</a>
<div>Vendor: {{ product.vendor }}</div>
<div>Type: {{ product.type }}</div>
</div>
The result will be like:
If you want to add link of product vendor, you can go to this thread: https://community.shopify.com/c/shopify-design/liquid-vendor-name/m-p/1985156