0

I have searched high and low to try and answer this one but to no avail thus far.

I have show out of stock products turned on through Magento 1.9.3.7 which is all working fine however on product page load all options show as if they are available until the mouse enters the swatch area and then the unavailable ones are then grayed out.

How can I get the unavailable swatches to show grey on page load.

I hope the above makes sense and an example can be seen at http://ooooosh.com/pleaser-adore-7802 for further clarity.

I thank you so much in advance as this is driving me insane! :)

1 Answer 1

1

You can find var swatchesConfig declared in template/configurableswatches/catalog/product/view/type/options/configurable/swatches.phtml.

On the latest Magento 1.9.4.5 it should be declared in template/configurableswatches/catalog/product/view/type/configurable/swatch-js.phtml

Also, in js/configurableswatches/swatches-product.js is a method called setAvailableOptions, so you can call that method in swatches.phtml:

    var swatchesConfig = new Product.ConfigurableSwatches(spConfig);
    swatchesConfig.setAvailableOptions();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.