Stores sometimes want to show a product without its price, for example when it is made to measure or priced per project and the price comes from a conversation. For the Swiss store Art of Fire I built price visibility that the team controls from the Shopify admin. Add a tag to a product, and its price disappears from the store. Remove the tag, and it is back.

Why a tag

A tag is the cheapest switch Shopify offers. Anyone who can edit a product can add one, it works the same way for every product, and it can be applied to many products at once with a bulk edit. Nobody has to open the theme code or ask a developer, and no product needs its own template.

The check in Liquid

In the theme, every product has a list of tags, and Liquid's contains operator checks whether a list holds a given value. The whole switch is one condition around the price:

{%- if product.tags contains 'hide-price' -%}
  <p class="price price--on-request">Price on request</p>
{%- else -%}
  {%- render 'price', product: product -%}
{%- endif -%}

A minimal version of the pattern; the tag name here is only an example. contains on a list matches whole values exactly, so pick one spelling for the tag and stick to it.

Every place a price appears

The condition is simple. The work is finding every place the theme prints a price, because a hidden price that still shows up in one corner of the store is worse than no rule at all. On Art of Fire the rule applies to both product pages and collection listings. In a typical theme, that means at least:

  • the price block in the main product section;
  • the product card snippet, which collection pages, search results and featured collections all reuse;
  • anything else that renders its own price, such as a quick-add modal or product recommendations.

The store also runs a search and filter app, which already had its own way of treating these products. I made the theme behave the same way, so a product does not show a price in the search results and hide it on its own page, or the other way round.

What a hidden price does not hide

Hiding a price in the theme changes what shoppers see. It does not make the price secret:

  • The product's JSON at /products/<handle>.js, part of Shopify's Ajax Product API, still includes the price.
  • Structured data and product feeds may still carry it, depending on how the theme and your sales channels are set up.
  • If the product can still be added to the cart, the cart and checkout show its price.

For "price on request" products that is usually fine: the goal is to start a conversation, not to keep a number confidential. If the price really must not be public, the product needs a different setup, for example no price on the product at all and a quote form instead.

The general lesson

When a store needs a rule that applies to some products and not others, put the switch where the team already works, in the product admin, and keep the logic in one condition in the theme. Then the hard part is only making sure the theme applies it everywhere, consistently with any app that shows the same products.

Further reading