Shopify themes, liquid, logos, and UX
I want to show what unit the price of a product is referring to e.g. Per kg, Per g, Per 250mL bottle
I don't see any option for this when setting up my products.
I'm using Dawn theme and here is a link to one of my product pages - https://phattai.au/products/broccoli
Password: EPIQMedia
Please let me know if there is a way to accomplish this? It seems like a very simple e-commerce function so I don't know why it wouldn't be available.
Solved! Go to the solution
This is an accepted solution.
Hi @Kani here is a simple guide for you. plz, explain where exactly you want to show that unit.
This is an accepted solution.
Plz, replace the previous code with this one.
It will hide the word Per if there is no unit defined for a product
add the below code after {{ money_price }} and remove the previous one that you added earlier.
{%- if product.metafields.custom.unit %}Per {{ product.metafields.custom.unit }} {% endif -%}
you can add unit via add metafield definition to product
This is an accepted solution.
Hi @Kani here is a simple guide for you. plz, explain where exactly you want to show that unit.
Thanks for that. I'm surprised that such a basic e-commerce function requires us to edit the site's code but it achieved what I wanted so I appreciate the help
This is an accepted solution.
Plz, replace the previous code with this one.
It will hide the word Per if there is no unit defined for a product
add the below code after {{ money_price }} and remove the previous one that you added earlier.
{%- if product.metafields.custom.unit %}Per {{ product.metafields.custom.unit }} {% endif -%}
Fantastic! This is great thank you.
if you want to show unit on sale items plz add the same code on below highlighted plzce in the same price.liquid file.
Is it possible to have this on the collection pages?
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025