2

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 – jafar pinjar Dec 23 '18 at 8:07
1

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. – Kees Janssen Dec 22 '18 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 '18 at 22:16
  • Error is too long, i made a screenshot: ibb.co/L6c5YVW – Kees Janssen Dec 22 '18 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. – Kees Janssen Dec 22 '18 at 22:19
  • Check if Admin>Store>Catalog>Catalog>Use Flat Catalog Category & make it NO – Imran Ali Dec 22 '18 at 22:20
0

I solved this issue by installing the following module:

https://github.com/mjankiewicz/MagentoConfigurableProduct

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.