コード例 #1
0
 /**
  * Return false if we have an item that's not backorderable or not out of stock
  * otherwise return true that all items are backorderable and out of stock.
  *
  * @param  Mage_Sales_Model_Quote
  * @return bool
  */
 protected function isAllItemBackorderableAndOutOfStock(Mage_Sales_Model_Quote $quote)
 {
     /** @var Mage_Sales_Model_Quote_Item[] $items */
     $items = $quote->getAllVisibleItems();
     foreach ($items as $item) {
         if ($this->quantityService->canSendInventoryAllocation($item)) {
             return false;
         }
     }
     return true;
 }