Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello!
we want to show our clients the costs per base unit (1kg) as well as a cost per cup of coffee in our store tazzacofee.de for the selected variant of coffee beans. It should look as follows:
The cost per base unit is already implemented as shown in the screenshot above and changes based on the variant (package size) selected.
The cost per cup of coffee is also already calculated, but does not update when the variant is changed. It requires a refresh of the website.
For the calculation, we are using the following code:
<span>nur {{ variant.unit_price | divided_by: 1000 | times: 7 }}ct pro ☕</span>
Am I just missing something here?
We are using Debut theme and updated the product-price.liquid.
Thank you already in advance,
Benedikt
sorry for any issye can you please try this way Shopify per Unit price
I would love to use this feature but it's only available for French and German stores. When will it be available in the US?
Hi @Savory_Gourmet ,
This feature can be implemented through custom development using a metafield within the theme.
Hi @TAZZACoffee ,
To fix this you have to work in script, which will calculate the same thing using javascript.
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