Skip to content

Commit

Permalink
checked if quote object contains id before looking for quote items
Browse files Browse the repository at this point in the history
  • Loading branch information
rav-redchamps committed Jan 22, 2020
1 parent 420a8b6 commit 2312289
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,13 @@ protected function _prepareCollection()
{
$quote = $this->getQuote();

if ($quote) {
if ($quote && $quote->getId()) {
$collection = $quote->getItemsCollection(false);
$collection->addFieldToFilter('parent_item_id', ['null' => true]);
} else {
$collection = $this->_dataCollectionFactory->create();
}

$collection->addFieldToFilter('parent_item_id', ['null' => true]);

$this->setCollection($collection);

return parent::_prepareCollection();
Expand Down

0 comments on commit 2312289

Please sign in to comment.