Hide Price On Theme Brooklyn - (Home + Collection + Product)

Lovinflame
Excursionist
40 0 22

Hi, I'd like to hide products' prices on theme Brooklyn's Home page, Collection pages, and Product pages.

Lovinflame_4-1632452921323.png

(Home Page)

Lovinflame_5-1632452963063.png

(Home Page)

Lovinflame_3-1632452845206.png

(Collection Page)

Lovinflame_6-1632453021387.png

(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".

Lovinflame_0-1632452676698.png

Looking for someone give me a hand, really appreciated!

 

Replies 4 (4)

Hardik29418
Shopify Partner
2858 407 1073

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.

- Need a Shopify developer? Chat on WhatsApp or EMAIL ME!


- Your Coffee Tip would do Magic code ❤️
- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Email

PaulNewton
Shopify Partner
6274 573 1319

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


dmwwebartisan
Shopify Partner
12280 2546 3694

@Lovinflame 

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.

09-25-iiglx-vyf0u.jpg

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

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app

Nick
Shopify Staff (Retired)
4531 434 1024

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.