Liquid, JavaScript, themes, sales channels
Hi There
I'm rather new to Shopify so I'm not sure if I'm just completely missing something obvious.
I want to be able to select a product variant via javascript.
So i have the following:
$('.single-option-selector').val(foo).trigger('change');
Which does select the correct variation but doesn't update the product price on the page.
I've had a look for ways to trigger the function which updates the price and come across the option_selection.js but generally find myself getting a bit lost in all the different forum posts.
I've matched the foo variable to the variant ID I need to select, but not sure where to go from there.
Thanks in advance,
Matt.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024