carolineschnapp
5/29/2014 - 3:06 PM

Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load.

Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load.

var optionSelectors = new Shopify.OptionSelectors...

// Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load.
optionSelectors.selectVariant({{ product.selected_or_first_available_variant.id }});