Skip to content

Commit 5b536fa

Browse files
committed
AC-3488::Fixed B2B integration test failure for \Magento\PurchaseOrder\Controller\PurchaseOrder\ViewTest::testBannerNotifications with dataset product_disabled_in_stock_right_item_qty
1 parent 439ea91 commit 5b536fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Quote/Model/Quote.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Magento\Quote\Model\Quote\Address\Total as AddressTotal;
1919
use Magento\Sales\Model\Status;
2020
use Magento\Store\Model\ScopeInterface;
21+
use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
2122

2223
/**
2324
* Quote model
@@ -1429,7 +1430,7 @@ public function getAllItems()
14291430
$items = [];
14301431
foreach ($this->getItemsCollection() as $item) {
14311432
/** @var \Magento\Quote\Model\Quote\Item $item */
1432-
if (!$item->isDeleted()) {
1433+
if (!$item->isDeleted() && (int)$item->getProduct()->getStatus() !== ProductStatus::STATUS_DISABLED) {
14331434
$items[] = $item;
14341435
}
14351436
}

0 commit comments

Comments
 (0)