FROM CACHE - en_header

Want to link amazon product SKU with shopify

Ihtisham
Shopify Partner
50 1 10

Hello guys, I want to link the amazon product SKU with shopify products. For example when I select product ABC there should be a link on side bar named as "price on amazon" when I click on that link it should redirect me to amazon store to same product. I  tried different ways like append and concatenate but failed. Need help

 

Thanks

Reply 1 (1)
speedboostr
Pathfinder
116 19 24

Here's how I would approach it:

 

1) Create a SKU map with the Shopify SKU + link to Amazon.

 

If you don't have a lot of products, I'd do it with liquid, for example:

 

{% if product.sku == "SKU123" %}
<p class="amazon-btn"><a href="put_amz_url_here" target="_blank">View it on Amazon here</a></p>
{% elsif product.sku == "SKU456" %}
<p class="amazon-btn"><a href="put_amz_url_here" target="_blank">View it on Amazon here</a></p>
{% endif %}

 

If you have a lot of products, I would probably add a .json file as a data asset and create SKU maps there, then pull that into your code and based on the current product SKU look up the link.

 

2) Now add the code to show the button / link. You probably have a Snippet called something like product-form.liquid. If not, start with your product Template and read the code to see the included files and determine where you want to put the code snippet.

 

3) Do all of this on a test theme, then preview it and test the links to make sure they go to the proper product.

Bonus tip: Sign up for Amazon affiliates so you get an affiliate commission on all Amazon sales that you refer from your site. Important: You probably have to add some kind of disclaimer that you may receive commissions from products purchased on Amazon, just check the affiliate terms first to make sure you're compliant with the wording.

 

If you need any help with the development part feel free to reach out to my team of Shopify developers at speedboostr.com/contact.

Creator of Theme Scientist (A/B testing app and theme scheduler). Creator of Shopify Analyzer (1st performance analysis tool for Shopify, free for the community). Founder of Speed Boostr (Shopify optimization experts + app developers). More apps from our team: Tip Jar (add a tip button), File Optimizer (optimize CSS, JS, Liquid).