Select variants by clicking their images
Normally, variants are selected from a drop-down menu. You might want your customers to be able to select a product variant by clicking a variant image.
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code.
- Open the
theme.js.liquid file in your Assets folder.
- At the bottom of the file, paste the following code:
- Click Save.