Shopify themes, liquid, logos, and UX
Hi, I'd like to hide products' prices on theme Brooklyn's Home page, Collection pages, and Product pages.
(Home Page)
(Home Page)
(Collection Page)
(Product Page)
And I've already used a "product.requires-contact.liquid" to replace the original "product.liquid" in order to hide "Shop Now & Add to Cart".
Looking for someone give me a hand, really appreciated!
Hello, @Lovinflame
Welcome to the Shopify Community.
I read your problem and it seems that I need to analyze your website to provide the solution here.
Would you please share your website URL and if your website is password protected then also provide the password.
First always check if there is a pre-existing theme setting ,as this may be more prevalent as OS2 themes rollout.
Always backup your theme before making change
For Brooklyn latest version there here are some approaches , if you want to buy this customization contact me at paull.newton+shopifyforums@gmail.com
First , in the related templates find the following line and comment it out to disable rendering of the product-price.liquid snippet
{% include 'product-price', variant: current_variant %}
for the home page this may not work as you may be referring to the individual sections you can apply there, same for OS2 themes so you'll want to use the next approach.
Second approach go into the snippet itself and wrap the logic to only work and not work on specific templates using the template object
https://shopify.dev/api/liquid/objects/template
https://shopify.com/admin/themes/current?key=snippets/product-price.liquid
{%- unless template == "index" or template == "collection" or template == "product" -%}
{%- comment -%} code you do NOT want to run on those templates but work everywhere else {%- endcomment -%}
{%- endunless -%}
The other approaches will often just be CSS that visual hides the prices but still renders them which can be a concern if your prices are sensitive and not meant to be served to browsers in any manner unless you permit it specifically such as when a customer is signed in.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
To do this you will need to delete or comment out a few lines of code within your Brooklyn Theme. I've listed the steps and attached some screenshots which are highlighted below for easier viewing.
1. Please log into your admin.
2. From the side menu, click "Online Store > Themes".
3. Now click "Actions > Edit Code".
4. In this screen, open up the "Snippets" folder.
5. Locate the "product-grid-item.liquid" file and jump to line 51 (see below).
6. You will want to delete or comment out lines 51 - 64, the whole price span on the product-grid-item file.
You can either delete the lines fully and then click the save button or you can comment out/hide the lines by entering <!-- and --> before & after the piece of original code. So you could enter <!-- at the beginning of line 51 and then --> at the end of line 64. When you're done hit the save button.
This will hide the piece of code instead of fully deleting it, so if you wanted to relist your prices further down the line, you would just need to remove the <!-- and --> code.
I hope this helps! Feel free to reach out to our support team any time as well. We're here 24/7 via chats, emails and phone. Just click 'talk to support’ for some more info! ?
All the best
Hi @Lovinflame,
I see there are some helpful replies in the thread already which involve some code edits/ changes.
If editing code is not something you're comfortable with, you can reach out to the Shopify theme support team for help on this. Because you are using the Brooklyn theme which is a free Shopify supported theme and if you're on a paid plan you're eligible for 60 minutes of free design time for small tasks such as this. You can log in and contact our support team here to begin the process if you wanted to go this route!
I want to say, I really like the candle images on your store, they look very cool! Other than this, how is the rest of your store going?
To learn more visit the Shopify Help Center or the Community Blog.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024