Shopify themes, liquid, logos, and UX
Hi, how do I add a link to a colour swatch? the link will leads to a product page of another colour of the same item when clicked.
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
thanks for your url are you abel to code try above code on product page
@elitaco Solutions to this will vary wildly by theme and the implementation of swatches.
You need to find the liquid file where the swatch is generated and find the html elements that have the swatch color, or the images and wrap it in an anchor tag pointing to the desired product.
PSUEDO code
{% assign colors_product_url = all_products["handle-of-product"].url %}
<a href="{{colors_product_url}}">
<img src="....." />
</a>
If your doing this because have standalone single variant products , aka flat products or product families, where each color is a standalone product but you need to related these products through a theme customization contact me with details for an estimate and demo;.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024