To gray out the variants that are sold out
-
From your Shopify admin, click Online Store, and then click Themes (or press
GWT). -
Find the theme you want to edit, click the
...button, and then click Edit HTML/CSS. -
Under Snippets, click the link Add a new snippet.
-
Name your new snippet
disable-sold-out:
-
In your new snippet file, paste this code hosted on GitHub.
-
Click Save.
-
Under Layout, locate the file
theme.liquid, and click it to open it in the code editor. -
Near the end of the file, right before the closing
</body>tag, paste the following code:{% include 'disable-sold-out' %}
-
Click Save.
To remove the variants that are sold out
-
From your Shopify admin, click Online Store, and then click Themes (or press
GWT). -
Find the theme you want to edit, click the
...button, and then click Edit HTML/CSS. -
Under Snippets, click the link Add a new snippet.
-
Name your new snippet
remove-sold-out:
-
In your new snippet file, paste this code hosted on GitHub.
-
Click Save.
-
Under Layout, locate the file
theme.liquid, and click it to open it in the code editor. -
Near the end of the file, right before the closing
</body>tag, paste the following code:{% include 'remove-sold-out' %}
-
Click Save
experts.