I want to add image variant to the product but unfortunately it’s not working. I get code from "https://mrdigitals.com/how-to-add-color-swatches-in-shopify-product-pages/". It’s not compatible with latest free theme versions.
store link : https://win-relief.myshopify.com/products/relaxing-heat-neck-massager
Password: 123
Hi @zahidshaki , kindly check out the below videos.
And
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
These are same code which are fine with older version. They are not compatible with latest version.
can you kindly tell me which version of theme are you using?
Hi @zahidshaki
It works not good above the version 15.0 free theme.
Pls follow below steps to fix it.
1.Open the file snippets/color-options.liquid
- Add below code inside the for loop
{%- capture input_dataset -%}
data-product-url="{{ value.product_url }}"
data-option-value-id="{{ value.id }}"
{%- endcapture -%}
- Add param input_dataset to at the end of radio input like this.
- Also add param to dropdown like this
Hope this helps.