Skip to content

Commit f3145eb

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-57719-error-500-on-checkout' into pr
2 parents 1760ae0 + a58bb2a commit f3145eb

File tree

1 file changed

+4
-1
lines changed
  • app/code/Magento/CatalogInventory/Helper

1 file changed

+4
-1
lines changed

app/code/Magento/CatalogInventory/Helper/Stock.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ public function addIsInStockFilterToCollection($collection)
154154
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
155155
);
156156
$resource = $this->getStockStatusResource();
157-
$resource->addStockDataToCollection($collection, !$isShowOutOfStock);
157+
$resource->addStockDataToCollection(
158+
$collection,
159+
!$isShowOutOfStock && $collection->getFlag('require_stock_items')
160+
);
158161
$collection->setFlag($stockFlag, true);
159162
}
160163
}

0 commit comments

Comments
 (0)