Re: Replace Add to Cart Button On Certain Collections

Replace Add to Cart Button On Certain Collections

tsccunningham
Visitor
3 0 0

I'm looking to remove the add to cart / checkout buttons on certain product collections and replace them with a button linking to a Google Form or other URL.

 

Certain "products" on our site are used as info pages for application forms, while other products are traditional ecommerce products with an add to cart / checkout process. The different product types are broken up by collection, so will need to have some collections with add to cart / checkout, others with a link to an application form.

Replies 3 (3)

Guleria
Shopify Partner
3422 681 965

Hello @tsccunningham ,

 

It's  possible but not without customization. 

Or you can try to search an app maybe something helpful found

or if you are looking for a developer to do it you can drop me an email.

 

Thanks

- If helpful then please Like and Accept Solution.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com
- Try GEMPAGES a great page builder

gr_trading
Shopify Partner
1935 146 202

Hi @tsccunningham 

 

You can add tag on product and edit card-product.liquid to hide button and show your Google sheet URL.

 

Use below code to read the tags

 

 

{% for t in product.tags %}

{% if t contains 'hide-cat-button' %} 

   <style>

     .product-form__submit{

        display: none;

     }

   </style>

{% endif %}

{% endfor %}

 

My recommendation will be to hire someone if you don't have understanding of coding and structure of Shopify.

 

Don't forget to keep the backup of your theme.

 

Looking to hire details are in BIO.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Guleria
Shopify Partner
3422 681 965

Condition with product tag is not recommended as you know filters also use tags so in that case it make issue. 
Much better to use checkbox meatfield 

and then through code 
{% if metafield %}
// leave blank or do something 
{% else %}

//default code as it is 

{% endif %}

 

- If helpful then please Like and Accept Solution.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com
- Try GEMPAGES a great page builder