Exemple #1
0
 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     /** @var \Magento\Reports\Model\ResourceModel\Quote\Item\Collection $collection */
     $collection = $this->quoteItemCollectionFactory->create();
     $collection->prepareActiveCartItems();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
Exemple #2
0
 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     /** @var $collection \Magento\Reports\Model\ResourceModel\Quote\Collection */
     $collection = $this->_quotesFactory->create();
     $filter = $this->getParam($this->getVarNameFilter(), []);
     if ($filter) {
         $filter = base64_decode($filter);
         parse_str(urldecode($filter), $data);
     }
     if (!empty($data)) {
         $collection->prepareForAbandonedReport($this->_storeIds, $data);
     } else {
         $collection->prepareForAbandonedReport($this->_storeIds);
     }
     $this->setCollection($collection);
     parent::_prepareCollection();
     $this->getCollection()->resolveCustomerNames();
     return $this;
 }