Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Remove quick shop button for certain product

Remove quick shop button for certain product

seantay1993
Explorer
87 2 7

I want to remove the quick shop button/function for the product tag with 'crw'. Anyway, could I do that?

 

Screenshot 2024-10-16 142832.png

Replies 4 (4)

rajweb
Shopify Partner
370 35 50

Hey @seantay1993 ,

 

Yes, you can remove the "Quick Shop" button or function for products with a specific tag, like 'crw', by adding some custom code to your Shopify theme.

Follow these steps:

1. Go to Online Store > Theme > Edit Code

2. Depending on your theme, you may need to look in files like product-card.liquid, product-grid-item.liquid, or similar files where the "Quick Shop" button is rendered. Check in the Sections or Snippets directories.

 

Add Conditional Logic:

Find the code that generates the "Quick Shop" button. It might look something like this:

 

<button class="quick-shop">Quick Shop</button>

 

Wrap this button code with a conditional statement to check if the product has the 'crw' tag:

 

{% unless product.tags contains 'crw' %}
  <button class="quick-shop">Quick Shop</button>
{% endunless %}

 

Test your store:

Go to your store and check a product tagged with 'crw' to ensure the "Quick Shop" button is no longer displayed.

 

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

Best Regard,

Rajat Sharma

-Need a Shopify developer?
https://rajatweb.dev/
Email: rajat.shopify@gmail.com

sahilsharma9515
Shopify Partner
1264 163 243

Hi @seantay1993 First you need to find the Quick shop code in your theme code files, more specifically you can find it in the collection page code.

 

Then after finding the code of the Quick shop button add this condition to solve your issue.

{% unless product.tags contains 'crw' %}
   <button type="submit" class="Quick-Shop">Quick Shop</button>
{% endunless %}

The main thing you need to do is to find the Quick shop button in your respective theme.

 

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

 

Best Regards

Sahil

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️


seantay1993
Explorer
87 2 7
sahilsharma9515
Shopify Partner
1264 163 243

Hi @seantay1993 Yes I got you, you just need to find the code for your quick shop in the theme, and then add this unless condition in that button

 

{% unless product.tags contains 'crw' %}
   <button type="submit" class="Quick-Shop">Quick Shop</button> // here will be you quick shop button code.
{% endunless %}

 

It will not add the button, but remove the existing button from your collection page.

Explanation:

  • The button will be shown unless the product has the tag 'crw'.
  • If the product has the 'crw' tag, the button will be hidden.
  • For all other products that don't have the 'crw'  tag, the button will be displayed.

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

 

Best Regards

Sahil

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️