All things Shopify and commerce
Hello,
Is there such a way to accomplish hiding prices, without using code? Or at least is there an easy to understand code?
I'm wanting to hide prices on a few products (for a client), mostly because they require a quote that calculates weight, shipping and distance.
What are the best ways to go about this?
Thanks
Hi, @samantham
While coding options for this are outside my scope of support, I thought I'd mention you can use an app from the app store to accomplish this. This will allow you to toggle on and off this feature as often as you like. Some options are:
You can have a look at other options on the app store by searching "hide price". Otherwise, hopefully another Community user will comment here on how you can achieve this through custom coding. You can always hire a Shopify Expert for custom coding as well.
Let us know how this goes!
To learn more visit the Shopify Help Center or the Community Blog.
I did see those, but my client is looking for a no-cost option as they get launched, and I've exhausted the "search" option, but that's why I mentioned "easy code". All of the others didn't seem to be working with my theme's existing code. I appreciate your reply!!
Hi @samantham you can try the Extendons Hide Price app with the free trial version. The Hide Price app is an easy way to hide prices on specific products and collection pages. It's easy to integrate with both free and paid themes
Well if you are using an OS 2.0 theme, this is very easy. Just go to theme customization and create a new template and apply to these products, and just remove the price section.
If you're using the older version of themes, go to theme codes, create a new product template, copy the normal template codes in this one and remove the section that shows the price. (I can't really tell you where it is since it's different for every theme) But it should be very easy to find
@Ardi94 It should be easy to find, but it's not. I've already tried that route and I get stuck because part of the code I'm looking for is simply nonexistent.
@samantham So I'm assuming it's a vintage theme, not OS 2.0, right? Are you using a free theme from Shopify? What's it called? I can take a look at the original codes and tell you where it is.
Also, if you post your URL here I might be able to tell you what to search for in your codes.
@Ardi94 Thank you. It's a paid theme called Responsive. The client's site is not live but here's the url https://bullfrogsmokers.com/
As a reminder, I only want to remove prices from a specific collection/few products, not the entire shop. Thanks for your help!
@samantham Can you send me the password too? I need to be able to look at the product page to find it. you can message me directly so it's not here
me and a tech friend are trying to update my site and need to remove the price on a couple retail items. But we are struggling to make it happen. Your help above is amazing and I’m not sure what the dead end we keep getting is. Was wondering if we can chat for help directly
looking for answers to the same! please tell me what worked for you!
add this on custom css
".price-box { display: none; }" without quotes
you can inspect your class description
i want the price to not show for products that have "0" as the prize, and the price should be hidden everywhere- collection, product page, cart, checkout. In which places should i be adding the code? will this code enough for that?
Hi, did you ever get this to work, i.e., hide the page on the product, collection, cart, checkout, etc.? The code snippet above doesn't seem to work for any page but the product page?
go to your theme
edit code
search for: card-product.liquid
replace the line code:
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
by this code(show price only if product available and equal or more than 1 dollar):
{%- if card_product.available -%}
{%- if card_product.available and card_product.price >= 1.00 -%}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{%- endif -%}
thanks to chatGPT for this code!
This worked for me but I had to add an additional {%- endif -%}
However, I encountered an issue with the code where, if an item sold out, the price for that item would no longer be shown—even on products where I wanted the price to always be displayed.
I fixed this by removing the
{%- if card_product.available -%}
{%- if card_product.available and card_product.price >= 1.00 -%}
and instead inserted
{%- if card_product.handle != "your-product-handle" -%}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{%- endif -%}
The "your-product-handle" is specific to the product that you want to hide the price on. It can be found by visiting the specific product page that you want to hide the from on and copying the end of the url.
For example: www.yourwebsite.com/products/"your-product-handle"
If you want to hide multiple products the code will look like this instead:
{%- if card_product.handle != "product-handle-1" and card_product.handle != "product-handle-2" and card_product.handle != "product-handle-3" -%}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{%- endif -%}
Ensure you keep the quotations as well when filling in the "your-product-handle"
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024