Uncaught ReferenceError: variantImages is not defined

krewzy
New Member
19 0 0

Hi,

I'm trying to follow this guide: 

https://help.shopify.com/themes/customization/products/variants/select-variants-by-clicking-images

I followed the instructions exactly and it didn't work at all, so I wrapped the product.liquid code in 
(function($) { 

});

And I get an error saying "Uncaught ReferenceError: variantImages is not defined"

I'm using the grid theme from pixel union.

Replies 2 (2)
Richard_
Shopify Expert
129 0 30

Hi,

May I know your store URL to see the code you added?

Richard Nguyen | PageFly CEO
krewzy
New Member
19 0 0

the code I added is exactly what is in the link. by 'wrapped the product.liquid code' i meant I put the contents of the JS for the product.liquid in a function