2

I see that there is a solution for M1. Would this work for M2?

https://stackoverflow.com/questions/35292353/out-of-stock-images-grey-out-if-products-are-out-of-stock-in-magento-1-9-x

1 Answer 1

0

Same code will work. Just add this code in app/design/frontend/packagename/themename/Magento_Catalog/template/product/list.phtml

<?php if (!$product->isSaleable()): {
 echo '<style>.category-products li.item .product-image img{ opacity:0.6;
 filter: alpha(opacity=60); } </style>';
 } endif;?>

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.