What's your biggest current challenge? Have your say in Community Polls along the right column.

How to change the code of Brooklyn template to hide product prices on certain product collection?

Solved

How to change the code of Brooklyn template to hide product prices on certain product collection?

2024Crystal
Tourist
11 0 0

We need to hide product prices on specific product collection pages for specific customers. In addition, hide the add to cart button on product sales page.

 

Can this be achieved by changing the code? Since the theme template we use is Brooklyn, which is no longer technically supported by the Shopify team, there is some confusion in modifying the code and whether to implement it this way.

Accepted Solutions (2)
Moeed
Shopify Partner
6367 1725 2088

This is an accepted solution.

Hey @2024Crystal 

 

I'm unable to locate the UK Collection, can you send a URL of that and To hide the add to cart button from page you can follow these steps.

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.product-single__add-to-cart {
    display: none !important;
}
</style>

RESULT:

Moeed_0-1707203886788.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


View solution in original post

Moeed
Shopify Partner
6367 1725 2088

This is an accepted solution.

Hey @2024Crystal 

 

Keep the previous code and add this new code above </body> in theme.liquid in the end of the file

{% if collection.handle == 'uk-only' %}
<style>
p.grid-product__price-wrap.t4s-product-price {
    display: none;
}
</style>
{% endif %}

RESULT:

Moeed_0-1707205413531.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


View solution in original post

Replies 11 (11)

Moeed
Shopify Partner
6367 1725 2088

Hey @2024Crystal 

 

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


2024Crystal
Tourist
11 0 0

Hi Moeed,

 

Thank you for your reply! Here is our store URL: https://buy.wisualarm.com/

Here is our cooperation code: 7001

Moeed
Shopify Partner
6367 1725 2088

Thanks for the store URL @2024Crystal , Can you also tell me that on which collections you want to hide the prices from and also confirming one more thing that do you want to hide the add to cart button from all the product pages?

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


2024Crystal
Tourist
11 0 0

Hey Moeed,

The product range we want to hide is the UK Collection.
Hiding the add to cart button on product pages is also a requirement. 

May I want to know if it will be complicated to modify the code?

Moeed
Shopify Partner
6367 1725 2088

This is an accepted solution.

Hey @2024Crystal 

 

I'm unable to locate the UK Collection, can you send a URL of that and To hide the add to cart button from page you can follow these steps.

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.product-single__add-to-cart {
    display: none !important;
}
</style>

RESULT:

Moeed_0-1707203886788.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


2024Crystal
Tourist
11 0 0

Hi Moeed,

 

Many thanks for your reply! That's help me a lot.

 

 

The URL of UK Collection is https://buy.wisualarm.com/collections/uk-only

 

Moeed
Shopify Partner
6367 1725 2088

This is an accepted solution.

Hey @2024Crystal 

 

Keep the previous code and add this new code above </body> in theme.liquid in the end of the file

{% if collection.handle == 'uk-only' %}
<style>
p.grid-product__price-wrap.t4s-product-price {
    display: none;
}
</style>
{% endif %}

RESULT:

Moeed_0-1707205413531.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


2024Crystal
Tourist
11 0 0

Thank you so much! You made my day!

Moeed
Shopify Partner
6367 1725 2088

Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


2024Crystal
Tourist
11 0 0

Hi Moeed,

 

I found a one more comlicated problem. 

 

We previously used an app called BSS: B2B/Wholesale Solution to automatically label and classify customers after registering and logging in. For example, the label for British customers is UK other all companies. So if what I mentioned earlier is that the prices of the products on the UK Collection page are hidden, but British customers can see these hidden prices after logging in, is this possible?

2024Crystal
Tourist
11 0 0

C4D79420-C55F-47dc-BF55-8A2CB7EA3CC6.png

Kind of like this.