$_product->isSaleable() shows different value in list page and view page magento 2

by Pratik Kamani   Last Updated June 13, 2019 10:09 AM

Issue: Out of stock set at admin side. On product list page display "Out of stock" while detail page shows "Add to cart" button.

I have print the $_product->isSaleable() function on list.phtml as well addtocart.phtml. For the same product list.phtml displays NULL, while addtocart.phtml displays 1 on the view page(Product detail). I have enabled the backorder for all product.

Check the above product in list page shows "Out of stock" while detail page has "Add to Cart" Button. Also, this product doesn't include in any bundle product.

Tags : magento2.3.0

Related Questions