- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2020
01:17 PM
02-21-2020
01:17 PM
Buy now / Add To Cart Button Open in External Link attribute
How can I get this done? maybe many of you already know how to do it. You can see the picture.
Goal:
- Allow all products to have a field called "External Link" here I can set a link.
- if the link is empty the products act normal, and if someone clicks "buy now" the product is added to cart.
- if the External Link field is filled with a link. then when the person clicks Buy now button instead of adding the product to the cart, it just open the link.
- That's it. I created the attribute but idk how to make this functionality.
help!
Labels:
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2020
01:05 AM
02-22-2020
01:05 AM
Re: Buy now / Add To Cart Button Open in External Link attribute
@starlyns you can override the file of product view.
In that you can check if this attribute has value.
If yes you can create a new button with Buy Now text with your external link else the original buy now button will be there.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2020
09:40 AM
02-24-2020
09:40 AM
Re: Buy now / Add To Cart Button Open in External Link attribute
How do I do this?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020
11:10 PM
02-27-2020
11:10 PM
Re: Buy now / Add To Cart Button Open in External Link attribute
@starlyns Sorry for late reply.
You can check the file from where you are getting the add to cart button.
For this just enable the profiler and check the template path.
When you finds the file there you can just add the condition if this attibute has value then show another button with this value else show add to cart button.
Let me know if you stuck anywhere.
Thanks