[Venture Theme] - Call theme JS functions when changing variants

Highlighted
New Member
1 0 0

Hello,

 

I'm looking for methods to call two Theme.js functions, _productThumbSwitch and _productThumbnailSlider when the variant is changed. The variants per product of my store are many so I need to limit images shown on product page. I've managed to write some liquid codes and JS to filter images displayed by image alt when the product page is loaded initially or users change the variant. When the product page is loaded initially, it works fine and the product images' functions like zoom image work normally. But when the variant is changed, the thumbnail slider isn't shown and zoom image doesn't work anymore.

 

Then I compared the code before and after the variant changed. I found that two original theme JS functions of Venture theme , _productThumbSwitch and _productThumbnailSlider, should be needed to run in order to initialize the thumbnail slider and image functions like zoom image, like when the page is initially loaded. But I can't find anyway to call these functions. As I'm not an expert of javascript and liquid, the codes of Theme.js are too complicated for me.

 

If anyone could help, it would be greatly appreciated. Thank you in advance.

 

0 Likes