Created
May 29, 2014 15:06
-
-
Save carolineschnapp/db7fb1cf412b5e0bdeaf to your computer and use it in GitHub Desktop.
Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment