What is the difference between isSaleable() and isAvailable()?

后端 未结 5 1717
无人共我
无人共我 2021-01-30 19:46

I\'m working on the display of the stock availability on the (individual) product page of my Magento theme, and there\'s something I don\'t completely understand about this.

5条回答
  •  遥遥无期
    2021-01-30 20:44

    isAvailable() is used to decide whether to display the product as in stock or out of stock, while isSaleable() is used to decide whether to show an Add to cart button or not.

提交回复
热议问题