Showing Sold out Variants with Linked Product Options

Highlighted
New Member
2 0 0

I am using the Supply theme, and have followed this guide: https://help.shopify.com/en/themes/customization/products/variants/link-product-options-in-menus. It's working for me, though I'm actually using the version modified to work with sectioned themes done by Jonathan Moore (Style Hatch): https://gist.github.com/jonathanmoore/c0e0e503aa732bf1c05b7a7be4230c61

 

I'm using it mostly to hide product variants that don't actually exist. For example if I had 3 shirt colours, and the 'red' shirt was only available in 'small' and 'large', it no longer shows the 'medium'. However, it also hides any variant that is sold out, so if I was out of 'small' red shirts, then only 'large' would appear in my drop down.

 

I have tracked the cause of this up this line

var Shopify = Shopify || {};

because when I log the 'Shopify' variable, this is the object I get;

log.PNG

Not seen here, there is actually another option that is completely sold out, (tube set) and the other options also have more sizes available that are sold out.

 

Is there any recourse here for me? Why aren't the sold out options included in the array? 

 

Thanks in advance for your help!

0 Likes
Highlighted
Shopify Expert
3899 559 935

Hi @Purveyor 

So you want to hide sold out option from drop down so user can select them ?

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
2 0 0

Hi @Jasoliya 

 

I would like for the sold out options to be visible by the customer, so they can select it and then see that it's sold out, without the non-existent options also showing up. We often have people use the website to check our inventory before coming into the store, or use it to check the sizes we carry for a product, and it would be nice to make that information more accurate.

0 Likes
Highlighted
Shopify Partner
45 3 8

Did you work out a solution to this?

I've got a product with multiple variant options but it allows you to select options for products we don't have. I'm trying to figure out how to grey out options that don't create a matching product.

0 Likes
Highlighted
Shopify Expert
3899 559 935

For that need to deal with Js code on variant callback function. You can find this in Asset->theme.js file, where you have to to get combination of sleeted variant and then disable option by Js.

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
1 0 0

Did you do anything special to get it to work on Supply theme? I've followed all the instructions and it's still not working

0 Likes