How to redirect the BUY button to en external page?

How to redirect the BUY button to en external page?

StefanHeg
Tourist
7 0 1

Hi,

my Shopify store is not ready with products and I want to redirect

the BUY button from the product page to the same product on Amazon,

where I have my products already listed.

Is there a way to embed an external link to the BUY button?

 

thank you

Stefan

Reply 1 (1)

JoesIdeas
Shopify Partner
2485 229 670

You can just create any normal button and link it to the page.

 

I would do this:

1) Find the Add to Cart button in your theme files (usually in a snippet called something like product-form.liquid, if not you can start with Templates > product.liquid then read the code to find where it's included).

 

2) Comment out the add to cart and put a new button, example:

{% comment %}
original add to cart button code here, just comment out so you can use in the future if you need
{% endcomment %}

<p class="external-button">Buy Now</p>

 

You can style the button using CSS, or you might just be able to add the same class your add to cart button has, replacing "external-button" there.

 

3) To automate it, you could create a data map in JavaScript for example if on product.handle X, link to Amazon page Y. This script would load on every product page and adjust the link dynamically.

 

If you're not familiar with editing Shopify themes this guide will help get you started: https://speedboostr.com/how-to-safely-edit-your-shopify-theme. If you prefer developer to handle it I would reach out to the devs at that site, I've worked with them and attest to their excellence.

 

Pro tip: sign up for an Amazon affiliate account and use an affiliate for those products, for a backend revenue source. I haven't done this in a few years so check the terms of service first, but you should be able to just put a disclaimer on the page that they are affiliate links.

• Creator of Order Automator [auto tag, fulfill, connect FBA, daily jobs]
• Co-Creator of Product Automator [suite of features for products / collections]
• Shopify developer for 10+ years, store owner for 7 years
• Blog: Shopify Tips, Guides, and Automation Tactics