Change product variant according to clicked image Brooklyn theme

Shopify Partner
10 0 2

Hello everyone. I've been struggling for a couple of days to make one feature work and can't seem to find the solution. All I want is that customer clicks on the image (thumbnail) of the product and it automatically changes the product variant from the dropdown menu. Same as described here: https://help.shopify.com/en/themes/customization/products/variants/select-variants-by-clicking-image... but for Brooklyn Theme. In my case I don't have colors, I have Lego Characters (https://legoavengers.com/products/free-lego-compatible-ninjago-sets). Any feedback is very appreciated!

1 Like
Shopify Partner
2567 39 585

Have you tried to implement the tutorial? Briefly, I see that you will probably need to replace 

thumbnails = $('img[src*="/products/"]').not(':first');

with 

thumbnails = $('.product-single__thumb');

and 

'.single-option-selector:eq('

with 

'.single-option-selector__radio:eq('

I'd recommend you to make a theme duplicate and try appying the code. If not working -- share the preview link here.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
4 Likes
Shopify Partner
10 0 2

Oh my god! You are the real hero! Thank you very much! It works like a charm!

1 Like
New Member
1 0 0

Nevermind

0 Likes
Shopify Partner
1 0 0

Nice! I have the same plan in my Brooklyn theme. I'm confuse if where will I start since the instruction were meant to different theme. Could you help me on the details. Thanks in advance.

0 Likes
New Member
7 0 0

Also on Brooklyn. It seems to only work when selecting an image on desktop mode. On mobile, when flicking through the images, the variants do not change.

How can we also make this work on mobile?

 

Thanks in advance!

0 Likes
Tourist
16 0 0
I’m also interested and also on Brooklyn!
0 Likes
Highlighted
New Member
1 0 0

please give me the soution for this problem

 

i cant select variant according  to images ,  I am using brooklyn theme

0 Likes