I have a little problem at my Magento 2.2.5 store. When a combination of a configurable product is not on stock, the swatch should be disabled with a red strike. But at my store no swatch is disabled, as you can see at the following screenshot:

No disabled Swatch

Actually, the Large size and green color isn't on stock. So it should be:

What is should be

Is somebody know what to do? If i want to select this combination and put it in my cart, i get the error "not on stock"

  • hi @Kees, This is not the default behavior of magento 2, Need to customize to achieve that functionality Dec 23, 2018 at 8:07

2 Answers 2


Try indexing :

  • php bin/magento indexer:reindex
  • php bin/magento cache:flush
  • Yes, i get an error: Catalog rule indexing failed. See details in exception log. Catalog rule indexing failed. See details in exception log. Dec 22, 2018 at 22:14
  • Can you share the error? Also, you can try php bin/magento setup:di:compile to get the exact error.
    – Imran Ali
    Dec 22, 2018 at 22:16
  • Error is too long, i made a screenshot: ibb.co/L6c5YVW Dec 22, 2018 at 22:17
  • Compilation result: Compilation was started. Interception cache generation... 7/7 [============================] 100% 21 secs 260.0 MiB Generated code and dependency injection configuration successfully. Dec 22, 2018 at 22:19
  • Check if Admin>Store>Catalog>Catalog>Use Flat Catalog Category & make it NO
    – Imran Ali
    Dec 22, 2018 at 22:20

I solved this issue by installing the following module:


  • your link is not working, can you please share other working link
    – Mohit Rane
    Dec 18, 2020 at 11:14
  • 1
    Hi, unfortunately not, because i found this solution 1 year ago... :-) Dec 19, 2020 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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