is">

$_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.

http://staging.mpex.com/photography.html

http://staging.mpex.com/panasonic-dmw-bgs1-battery-grip.html

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


Updated January 28, 2019 09:09 AM

Updated October 01, 2018 18:09 PM

Updated June 03, 2019 14:09 PM

Updated November 21, 2018 13:09 PM

Updated January 04, 2018 15:09 PM