Hiding prices on expensive items?

Highlighted
New Member
3 0 0

Hi,

I have items on my store that are many thousands of dollars. How would I be able to hide prices of these items when they are listed next to less expensive items?

I.e. a piece of art is 20,000USD and I don't want that to be displayed when it's next to an item that is only a few hundred dollars. Is there a simple fix like (if item price is more than x amount do not display price)? Perhaps assigning a tag to these items and then saying "if tag is equal to ...." I'm not exactly a programmer, so would appreciate advice on this.

I obviously want the price to show on the item page itself, just trying to hide it on the home page/ some collection pages.

Thank you!

0 Likes
Highlighted
Shopify Expert
498 9 96

Yes, it can be done, but how to code that in will largely depend on your theme code. Most themes have a 'snippet' called something like 'product-grid-item.liquid' or 'product-card.liquid'. Then in that snippet find where the price is being output and wrap it in an 'if' statement like this:

{% if product.price < 2000000 %}
  ...
{% endif %}

Note the value we're checking against is multiplied by 100 because the `product.price' is in cents. 

0 Likes
Highlighted
New Member
3 0 0

Thank you for your reply. I am using the Prestige theme... I don't see either of those options. Would it be called something else?

0 Likes
Highlighted
Shopify Expert
498 9 96

Yes, it probably is then. I'm not familiar with the code of that theme, but try looking in the collection template and look for the product loop and what snippet is being included there.

{% for product in collection.products %}
  ... {% include '?????' %}
{% endfor %}

The name of that include is what you need to find. 

0 Likes
Highlighted
New Member
3 0 0

I found this within the collection-template.liquid:

{%- if collection.products_count > 0 -%}
    {%- paginate collection.products by section.settings.grid_items_per_page -%}
      <div class="ProductListWrapper">
         <div class="boost-pfs-filter-products ProductList ProductList--grid {% if paginate.pages > 1 %}ProductList--removeMargin{% endif %} Grid" data-bc-sort="{{ collection.default_sort_by }}" data-mobile-count="{{ mobile_items_per_row }}" data-desktop-count="{{ desktop_items_per_row }}">
           {%- for product in collection.products -%}
            <div class="Grid__Cell 1/{{ mobile_items_per_row }}--phone 1/{{ tablet_items_per_row }}--tablet-and-up 1/{{ desktop_items_per_row }}--{% if section.settings.filter_position == 'drawer' %}lap-and-up{% else %}desk{% endif %}">
              {%- include 'product-item', show_product_info: true, show_color_swatch: section.settings.show_color_swatch, show_labels: true, show_vendor: section.settings.show_vendor -%}
            </div>
          {%- endfor -%}
        </div>
      </div>
0 Likes
Highlighted
New Member
2 0 1

You should take a look in the "product-item" snippet.

0 Likes