How to hide pricing for certain products?

RyanRichie
Excursionist
16 0 5

My goal is to hide pricing for certain products, I think the easiest way to do this would be to hide pricing for products that cost $0.00. Anything that costs more that $0.00 should show its price. 

 

I have found ways to do this in the product page however, the price still shows in search pages. Please let me know if anyone has a solution, much appreciated!

Thank You, Ryan Richard
Replies 2 (2)

PageFly-Richard
Shopify Partner
4322 980 1639

 

Hi @RyanRichie 

 

This is Richard from PageFly - Shopify Page Builder App

 

If you are using Dawn theme you can try to add this condition to price.liquid

Add a condition on price__regular  div. 
You can add whatever logic you want on it. 

PageFlyRichard_0-1715132215761.png

 

 

If you are on another theme, you can try to search with file that's handle the pricing.

 

Hope this can help you solve the issue 

 

Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

BSSCommerce-HDL
Shopify Expert
723 238 249

Hi @RyanRichie ,

 

First of all, you have to identify the HTML element of price. The element can be different in each theme. 

Then put those elements in the following price checking code:

 

{% if product.price > 0 %}
   <!-- Element show price -->    
{% endif %}

 

For example:

 

{% if product.price > 0 %}
   <span class="visually-hidden visually-hidden--inline">
      {{ 'products.product.price.regular_price' | t }}
   </span>
   <span class="price-item price-item--regular">
      {{ money_price }}
   </span>
{% endif %}

 

Hope this helps

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency