Modify cart button on product page

Solved
Highlighted
New Member
9 0 0

hello, is it possible to change the add to cart button to direct it to a different email BUT i only need to do it on 3 products

0 Likes
Highlighted
Shopify Expert
3657 549 883

yes its possible but need custom code.

You have to add tag in product and then make condition base on that.

then you have to show new button with email in condition and in else condition show regular button. 

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
New Member
9 0 0

are you the personel from shopify? if yes, can you possibly teach me how to do it?

0 Likes
Highlighted
Shopify Expert
3657 549 883

Yes, but cant give you 100% code. 

You have to add tag like "email_pro"

then go to section->product-template file and find name="add" (add to cart button)

then add this code:

{% assign check_item='false' %}
{% for tag in product.tags %}
     {% if tag  contains 'email_pro' %}     
            {% assign check_item='true' %} 
     {% endif %}
  {% endfor %}

  {% if check_item=='true' %}
      //show you email content
  {% else %}
      //keep regular add to cart button.
  {% endif%}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes