Skip to content

Instantly share code, notes, and snippets.

View jonolayton's full-sized avatar
🎯
Focusing

Jono Layton jonolayton

🎯
Focusing
View GitHub Profile
@jonolayton
jonolayton / theme.js
Last active April 1, 2022 14:52
Hide unavailable secondary product options in Shopify's Debut theme
/*
**README**
The method below simply makes variant options which aren't available in a secondary dropdown menu "disabled"
when using the Debut theme in Shopify.
It works for me, but I'm not making any promises for you...
Firstly, the _hideUnavailableOptions method needs to be added to Variants.prototype (see code below).
$(document).ready(function() {
$("#multi").submit(function(e) {
e.preventDefault();
$("#output").empty();
var array1 = [];
var array2 = [];
var array3 = [];
$(".col1").each(function() {
var word1 = $(this).val();