Skip to content

Instantly share code, notes, and snippets.

@faisalanmol
faisalanmol / gist:a41039f1081022c2a98ef661b4fa7bc4
Created June 18, 2021 05:14 — forked from jonathanmoore/gist:c0e0e503aa732bf1c05b7a7be4230c61
Linked options helper methods for Shopify. See this: http://docs.shopify.com/manual/configuration/store-customization/advanced-navigation/linked-product-options - Updated to work with sectioned themes (tested with District)
<script>
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: mllegeorgesand@gmail.com
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus
// Modified by Jonathan Moore (Style Hatch) https://github.com/jonathanmoore
/*
Updated to work with sectioned themes
- Added required methods from the deprecated options_selection.js
- Triggers an initial variant change
- Hides sold out variants with only one option