How to hide prices for $0 items

Solved

How to hide prices for $0 items

StanSavellis
Tourist
23 0 0

Hello,

 

I'm currently running the Boost theme and hide my prices when an item is sold out. I'm now looking at hiding the price when the product is not sold out, but the amount is set to $0. I'm currently using this option for items that I want customers to request a price ('price on application') for high-end value items.

 

I can't seem to find a successful code option for the theme I'm running.

 

Can anyone please provide any assistance?

 

Products that fall into this category can be seen here:

https://thatretropiece.com/collections/wall-sculptures

Accepted Solution (1)

BSSCommerce-B2B
Shopify Partner
1715 511 571

This is an accepted solution.

Hi @StanSavellis ,

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Find file product-block.liquid and search for the code snippets below

BSSCommerceB2B_1-1726288075308.png

Step 3:  Wrap all the code i've mark above by this code

{% if product.price > 0 %}
// This is the marked code
{%endif}

It will look like

BSSCommerceB2B_2-1726288135307.png

Step 4. Find file main-product.liquid and search for the code snippets below

BSSCommerceB2B_3-1726288221232.png

Step 5:  Wrap all the code i've mark above by this code

{% if current_variant.price > 0 %}
// This is the marked code
{%endif}

 It will look like

BSSCommerceB2B_4-1726288359751.png

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 3 (3)

BSSCommerce-B2B
Shopify Partner
1715 511 571

This is an accepted solution.

Hi @StanSavellis ,

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Find file product-block.liquid and search for the code snippets below

BSSCommerceB2B_1-1726288075308.png

Step 3:  Wrap all the code i've mark above by this code

{% if product.price > 0 %}
// This is the marked code
{%endif}

It will look like

BSSCommerceB2B_2-1726288135307.png

Step 4. Find file main-product.liquid and search for the code snippets below

BSSCommerceB2B_3-1726288221232.png

Step 5:  Wrap all the code i've mark above by this code

{% if current_variant.price > 0 %}
// This is the marked code
{%endif}

 It will look like

BSSCommerceB2B_4-1726288359751.png

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

StanSavellis
Tourist
23 0 0

Thank you, thank you, THANK YOU - worked perfectly. Appreciate your time.

BSSCommerce-B2B
Shopify Partner
1715 511 571

@StanSavellis , glad to hear that 😊

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now