pfortin-expertime / MageFix-Customer

Add Customer Admin Shopping Cart View in Magento 2
11 stars 6 forks source link

Updated the _prepareCollection() method #3

Closed marshallthornton closed 5 years ago

marshallthornton commented 5 years ago

Fixes a fatal error that occurs when products have options in the cart. The admin page tries to load the item collection twice but the second time has fake product ID's from the product options that throws a fatal error in the magento/module-quote/Model/ResourceModel/Quote/Item/Collection.php::removeItemsWithAbsentProducts() method when it tries to remove them since it cannot find the quote item by the fake product ID key. This skips that step if the collection has already been loaded previously so we can just display the already loaded items on the grid.

pfortin-expertime commented 5 years ago

Thank you @marshallthornton for this improvement