How to remove price from sold items? classic theme

Solved
Highlighted
New Member
9 0 0

I am trying to figure out how to remove the price from sold items.  I have collection set up to automatically put items into a sold collection if the quantity is 0, so I would like those to not display prices also?  I am happy to attempt it myself if the code isn't too complicated, but the only solutions I have found are for other themes and not the classic theme ...

0 Likes
Highlighted
Shopify Expert
3479 543 820

You just want to hide price in your assigned collection or all over store? 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
Shopify Partner
1281 169 403

If you're trying to remove it remove it from the product page you'd look in product.liquid. Inside there you might see something like:

 

{% include 'product-template' %}

If that's the case you'll want to open a product-template snippet from your Snippets folder. If not, then you'll be editing product.liquid. You'll want to find where the price occurs, which will probably be something like:

 

{{ product.selected_or_first_available_variant.price }}

Assuming that in your admin you have the option "Track Quantity" and don't have "Allow users to purchase this product when it's out of stock" checked you can wrap an if statement around that checking if it's available:

 

{% if product.available %}
{{ product.selected_or_first_available_variant.price }}
{% endif %}

This way it will only show when your inventory is greater than 0.

 

Same process for collection.liquid if you are trying to remove it from a collection.

 

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Highlighted
New Member
9 0 0

From the product page also - I don't have it set up where people can purchase if it is sold out ... all of the items are one of a kind so I use that as sort of my gallery of past work.

0 Likes
Highlighted
New Member
9 0 0

I've tried to add in that "if" code but it doesn't seem to be changing anything.  I do have my shop set up so that it does track inventory and does not allow people to add things to cart if the inventory is 0. 

 

 

0 Likes
Highlighted
Shopify Partner
1281 169 403

Where did you change the code? If you only did it in product.liquid it will only not display the price on the product page. It's hard to give exact instructions on what to do without being able to go into the code and mess with it, and as your theme is not free we can't go into our developer stores to see what exactly you need to do. If you message me your myshopify.com address I can request access to your store and take a look at it for you.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Highlighted
New Member
9 0 0

Sure!  it is https://thepebblepathway.myshopify.com/

 

I am happy to pay you for your time!

0 Likes
Highlighted
Shopify Partner
1281 169 403

I should have also requested access for your products. Can you give my account permissions for products as well? Or could you point out a product that should not have it's price listed?

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Highlighted
New Member
9 0 0

I just went in there before I saw your last message and it looked all fixed!  Thank you so much!!  Please let me know if I can pay you for your time or give you a shout out somewhere!

0 Likes
Highlighted
Shopify Partner
1281 169 403

This is an accepted solution.

Nevermind, I found your soldout collection. I added the condition around your price variables. I think that should take care of it. As for payment, if you want to turn on messaging in your account here I can send you my email to pay by paypal ($5). Otherwise, don't worry about it. It was an easy fix, but if you require any other edits please feel free to contact me. 

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes