Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi everyone,
in the variant of a product it is possible to mark a checkbox named 'Show unit price for this variant'. This will then active further fields called 'Total product measurement' and 'Base measure'. When filled out this information will show beneath the price on the product page.
This is mandatory for many products in the German market, so we need to set this.
Is there any possibility to set these fields in bulk?
I tried importing these fields, as well as the bulk editor but with no luck. We have currently over 7000 variants in our show, which would make this a very tedious task.
Any help is appreciated!
Solved! Go to the solution
This is an accepted solution.
Unfortunately, there is no built-in functionality in Shopify to bulk edit the "Show unit price for this variant," "Total product measurement," and "Base measure" fields for variants. The Shopify admin interface and the available bulk editing options are limited to certain fields, and these particular fields are not included.
To set these fields for your variants in bulk, you would need to use a custom solution. Here are a couple of options you can consider:
Bulk editing app: There are third-party apps available on the Shopify App Store that offer advanced bulk editing features. These apps can provide additional flexibility and allow you to edit custom fields, such as the ones you mentioned, in bulk. Search for "bulk editing" or "bulk product management" apps in the Shopify App Store to find options that meet your requirements. Be sure to carefully review the app features and user reviews before selecting one.
Custom development: If you have programming knowledge or access to a developer, you can create a custom solution to update these fields in bulk. This would involve using the Shopify API or the Shopify Bulk API to programmatically update the variant data. You can build a script or app that reads the data from a spreadsheet or CSV file and updates the necessary fields for each variant.
This is an accepted solution.
Unfortunately, there is no built-in functionality in Shopify to bulk edit the "Show unit price for this variant," "Total product measurement," and "Base measure" fields for variants. The Shopify admin interface and the available bulk editing options are limited to certain fields, and these particular fields are not included.
To set these fields for your variants in bulk, you would need to use a custom solution. Here are a couple of options you can consider:
Bulk editing app: There are third-party apps available on the Shopify App Store that offer advanced bulk editing features. These apps can provide additional flexibility and allow you to edit custom fields, such as the ones you mentioned, in bulk. Search for "bulk editing" or "bulk product management" apps in the Shopify App Store to find options that meet your requirements. Be sure to carefully review the app features and user reviews before selecting one.
Custom development: If you have programming knowledge or access to a developer, you can create a custom solution to update these fields in bulk. This would involve using the Shopify API or the Shopify Bulk API to programmatically update the variant data. You can build a script or app that reads the data from a spreadsheet or CSV file and updates the necessary fields for each variant.
Aside from bulking editing.. I don't see this option on my product page.. is there a way to turn this on? (I am using the dawn theme if that matters)
Same for me, I need to have the "Show Unit Price" feature available for my US store.
Hey @Vapes4You @Savory_Gourmet @derekdebiak
Send that to our Support and they can activate the Unit Price for you in the backend! Currently it is only activated for German and French stores by default due to the strict laws over there.
Greets! 😉
Gabe | Social Care @ Shopify
- War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen!
- Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung
- Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog
Hi,
Have you managed to find an app that turns on "show unit price for this variant" for multiple products in a specific category and then massively adds measurement values?
Regards
Hi @Zraszacz ,
I have solved this issue by adding new metafields to the products and then adding that information via code into the products, search & discovery, and product cards. The metafields can be edited with the bulk editor from Shopify.
Unfortunately there is no app or API call to do this and Shopify itself did not change this until now.
Kind regards
Hi @Vapes4You,
Thank you for your response. What about when you make a sale at your shop? The prices in these metafields will not change after all. Do you make it manually?
Best regards
Hi @Zraszacz,
the prices adjust automatically.
In my case all products are liquids, according to german (EU) law my base measurement unit for all products is litres (l), and my measurement unit for my products is millilitres (ml).
I have added 2 metafields for this: Grundpreispflichtig (True/False) and Inhalt (decimal). Which translates to "unit price mandatory" and "content".
The code I use to calculate the result is the following:
{% if product.metafields.custom.grundpreispflichtig %}
<div class="grundpreis">Grundpreis: {{ product.price | divided_by: product.metafields.custom.inhalt | money_with_currency}}/L</div>
{% endif %}
Which looks like this:
But if you use different base units, you could e.g. use 4 metafields base unit measure, base unit content, unit measure, unit content
and then extend the code to match your needs.
Kind regards
That was very helpful! Thank you good man!
Regards
No problem, I am glad that I could help 🙂
I hope that shopify adds these fields to the bulk editor and to the excel import funktion soon...
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025