Solved

HELP Hide Prices for Products Priced $0 ONLY on Collection Pages and Product Pages - Minimal Theme

auroradreamsco
Excursionist
16 0 3

Hi! I have collection pages of items I'd like to sell, and collection pages of items that are sold, but that I want to display. I'd like to hide the prices for ONLY the products priced at $0, on the collections pages AND product pages. I have found many solutions across the web, but none of them have worked. The only thing I have successfully done is hide ALL product prices. I'm using the minimal theme with many adjustments already made. Please help! My launch is tomorrow! Thank you very much!

Accepted Solutions (2)
suyash1
Shopify Partner
9077 1129 1479

This is an accepted solution.

yes, need to adjust existing coding, but do it only if you know how to else
hire coding expert, or I can check it for you
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI

View solution in original post

suyash1
Shopify Partner
9077 1129 1479

This is an accepted solution.

please check your site, and collection and let me know the update

https://aurora-dreams-co.myshopify.com/collections/gallery-acrylic-pour-paintings

https://aurora-dreams-co.myshopify.com/collections/shop-all-available-products
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI

View solution in original post

Replies 25 (25)

Clarke-
Shopify Partner
48 6 14

@auroradreamsco You can query the product object for anything over $0 https://shopify.dev/docs/themes/liquid/reference/objects/product#product-price

{% if product.price >= 0 %}
   *SHOW PRODUCT PRICE*
{% endif %}

  

in the minimal theme you'll find the relevant code in product-grid-item.liquid

 

 

Please like and mark my post as a solution if I've helped you, thanks.
Clarke-
Shopify Partner
48 6 14

Worth noting, I'm assuming what you're doing is selling 1 off products, then once sold reducing price to 0 so they may remain on your store but not be sold.

 

if that is the case i would suggest you use the product.available object and make use of Shopify inventory management, this will mean you don't have to change the prices of your products and prevent them from being purchased

 

{% if product.available %}
   *SHOW PRICE*
{% endif %}
Please like and mark my post as a solution if I've helped you, thanks.
auroradreamsco
Excursionist
16 0 3

thank you for the quick reply! where is the correct place to insert this? 

suyash1
Shopify Partner
9077 1129 1479

@auroradreamsco - the code will need to be added to collection and product page

 

if you are not familiar wit coding then you can add me to staff, I will do it 

To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
auroradreamsco
Excursionist
16 0 3

i have basic experience with the coding, if you let me know exactly which .liquids to add to, i should be good 🙂

auroradreamsco
Excursionist
16 0 3

Screenshot (11).pngScreenshot (10).png

suyash1
Shopify Partner
9077 1129 1479

it can be if it is used to show all the products

To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
auroradreamsco
Excursionist
16 0 3

sorry, i don't understand. do i need to add the above snippet to product/collection pages in order to hide the prices of the products that aren't technically available/$0?

auroradreamsco
Excursionist
16 0 3

or do i need to adjust an already existing code? 

suyash1
Shopify Partner
9077 1129 1479

This is an accepted solution.

yes, need to adjust existing coding, but do it only if you know how to else
hire coding expert, or I can check it for you
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
auroradreamsco
Excursionist
16 0 3

okay i would like to use this solution: 

if that is the case i would suggest you use the product.available object and make use of Shopify inventory management, this will mean you don't have to change the prices of your products and prevent them from being purchased

 

{% if product.available %}
   *SHOW PRICE*
{% endif %}

 

do i change this in product-grid-item.liquid? and what does the line originally say? 

suyash1
Shopify Partner
9077 1129 1479
not sure what original line says, need to check files for it, not possible
without login
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
auroradreamsco
Excursionist
16 0 3

what information do you need to log in and help ? 

suyash1
Shopify Partner
9077 1129 1479
add me to staff
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
auroradreamsco
Excursionist
16 0 3

Suyash i sent you the invite. Hoping i can get this fixed today

suyash1
Shopify Partner
9077 1129 1479

This is an accepted solution.

please check your site, and collection and let me know the update

https://aurora-dreams-co.myshopify.com/collections/gallery-acrylic-pour-paintings

https://aurora-dreams-co.myshopify.com/collections/shop-all-available-products
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
auroradreamsco
Excursionist
16 0 3

AMAZING I'm am so so grateful thank you!!! Do you know if its possible to make the product pages for the $0 items to ONLY show a photo, title, and description? 

auroradreamsco
Excursionist
16 0 3

bump!

suyash1
Shopify Partner
9077 1129 1479

@auroradreamsco - hello, on which page do you want only that content? can you send me page link?

To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
stellaa
Excursionist
43 0 11

Hi there

May I ask you to do something similar for me? I would like to hide the price on the product pages of a very specific collection.

 

Clarke-
Shopify Partner
48 6 14

@auroradreamsco  as you are using the Minimal theme you will need to edit the product-grid-item.liquid as mentioned earlier.

the price is displayed with the {{ price }} is at the bottom of the code ( line 90 )

 

{% if on_sale %}
   <span class="visually-hidden">{{ 'products.product.sale_price' | t }}</span>
{% else %}
   <span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
{% endif %}
{{ price }}
{%- assign variant = featured.selected_or_first_available_variant -%}

 

you will apply the code to the {{ price }} so your code will look like the following

 

{% if on_sale %}
   <span class="visually-hidden">{{ 'products.product.sale_price' | t }}</span>
{% else %}
   <span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
{% endif %}
{% if product.available %}
   {{ price }}
{% endif %}
{%- assign variant = featured.selected_or_first_available_variant -%}

 

If this helps you achieve your goal please mark this a solution to help others searching the community.

 

Please like and mark my post as a solution if I've helped you, thanks.
auroradreamsco
Excursionist
16 0 3

Unfortunately Clarke this did not work for me. I still see the $0 on the collections pages on those items that do not have prices, inventory, skus, or anything. 

pfrunz
Visitor
1 0 0

Is there a version of this that works for Studio Theme?
thanks

suyash1
Shopify Partner
9077 1129 1479

@pfrunz - it will need code editing , but it can be done

To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI
suyash1
Shopify Partner
9077 1129 1479
this is code editing, adding this line will not help, he told you the
logic, not exact solution
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
paranormal story video using AI