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;
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!
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.
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.
User | Count |
---|---|
681 | |
138 | |
104 | |
63 | |
36 |