What’s our best option for handling call to order pricing for product variants?
We have handled this with a tag that hides the price for simple products. (i.e. no variants) However, this does not work with product variants since you cannot add tags to product variants.
1 Like
Shopify doesn’t support variant tags, so you’d need either custom code to hide prices at the variant level or use an app built for ‘call for price’ functionality.
Hello @shopify_noob ,
I hope you are doing well!
You’re absolutely right — in platforms like Shopify, tags can only be added to products, not to individual variants. That’s why a solution that relies on tags to hide the price of simple (non-variant) products doesn’t extend naturally to products with variants.
If you want to hide prices based on specific product variants, here is the approach which you could consider:
- In Shopify Admin:
- Go to Settings > Custom Data > Variants.
- Add a new metafield definition (e.g.
hide_price as a boolean or string).
- Assign the metafield to the relevant variant(s):
- Go to the product.
- Select the variant.
- Scroll to “Metafields” and set
hide_price = true (or whatever you choose).
- In your theme code (usually
product.liquid or wherever you’re outputting the variant price):
{% if current_variant.metafields.custom.hide_price != true %}
<span class="price">{{ current_variant.price | money }}</span>
{% else %}
<span class="price hidden">Contact us for pricing</span>
{% endif %}
I hope my respone will help you.
1 Like