You use the Express theme and have the product page set to display products in an overlay.
Steps for Sectioned themes
Select your theme
The steps for this customization vary depending on your theme. Click the button for your theme before following the instructions below:
Steps for Non-sectioned themes
Hide sold-out variants
If you use a non-sectioned theme, then you can follow these steps to hide sold-out variants on the product page.
Steps:
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code.
In the Snippets directory, click Add a new snippet.
Name your new snippet remove-sold-out:
In your new snippet file, paste the following code:
Click Save.
In the Layout directory, click theme.liquid.
Near the end of the file, right before the closing </body> tag, paste the following code:
Click Save.
Deactivate sold-out variants
If you use a non-sectioned theme, then you can follow these steps to deactivate sold-out variants. The variants are still displayed on the product page, but they can't be selected.
Steps:
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code.
In the Snippets directory, click Add a new snippet.
Name your new snippet disable-sold-out:
In your new snippet file, paste the following code:
Click Save.
In the Layout directory, click theme.liquid.
Near the end of the file, right before the closing </body> tag, paste the following code:
Click Save.
Can’t find the answers you’re looking for? We’re here to help.