Re: Change Add to Cart for a Collection this is no longer available online

Change Add to Cart for a Collection this is no longer available online

MattBailey
Tourist
10 0 3

Hi, I am hoping someone here can help me with this question.

 

We carry a brand that we are no longer allowed to sell online. We want the products that we stock to be seen online, but instead of an 'Add to Cart' button - I'd like to see a "Contact Us" link. We are using the updated DAWN 12.0 theme, and I am happy to add code to the collection or each of the products. Can someone please provide the code [and where to add it] or a workaround they used? Currently, I've unpublished all the products which isn't ideal for our business!

 

Thank you!

Replies 2 (2)

sahilsharma9515
Shopify Partner
1277 165 247

Hi @MattBailey You need to add the code, I can't provide you the exact file name where the code needs to add because I need to look into the theme code first and then try where this can work, you can do it by yourself as well.

 

{% if collection.title == "your collection name" %}
<div>
 <a href="yor mail id" target="_blank">Enquire with us via Email now</a>
</div>
{% else %}
Your normal add to cart button.
{% endif %}

You need to add this code in your theme and it may help you in this situation.

 

Also you can add unless condition as well in this situation.

 

If you will unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.

 

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! ❤️


MattBailey
Tourist
10 0 3

Hi all, I found a solution by creating a new product type in Themes [in addition to default product], omitting the Add to Cart button, then applying that Product Template to the collection that I can't sell online. At the bottom of the page, I also added a contact us. It's a good enough work around for us.