Ecommerce Shopify WordPress Discussion

Shopify: How to add a button link to Amazon listing based on the current product page?

Using one of the free Shopify templates ("Refresh"), I want to add a 3rd button below the default add to cart and buy button that says "Buy on Amazon" and links to the Amazon listing of the same product. To make it look natural with the theme, I was able to "Add Block" on the product page called "Custom Liquid" which allows me to put in some code to make a button with a custom link. But this will be the same link for every product, how would I be able to base the URL on the current product page that a customer is viewing? Current code: {{ 'Buy on Amazon' | link_to: 'my-URL', class: 'button' }} - I tried to find a way to tag each Amazon URL to each product in the Shopify products data section but there is not option. I read some of the Liquid documentation and see that there are 'objects' for products and that you can call them up using handles and return tags. But I do not know how to correctly associate each URL to each product within the code, nor do I know how to retrieve that URL based on the current product page.
Please check my detailed blog for this issue https://inittasker.com/boost-your-shopify-store-integrate-amazon-product-urls-for-every-product/

December 30, 2023

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.