Esempio n. 1
0
 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     $collection = $this->_quotesFactory->create();
     $collection->prepareActiveCartItems();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
Esempio n. 2
0
 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     /** @var \Magento\Reports\Model\Resource\Quote\Item\Collection $collection */
     $collection = $this->quoteItemCollectionFactory->create();
     $collection->prepareActiveCartItems();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
Esempio n. 3
0
 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     /** @var $collection \Magento\Reports\Model\Resource\Quote\Collection */
     $collection = $this->_quotesFactory->create();
     $collection->prepareForProductsInCarts()->setSelectCountSqlType(\Magento\Reports\Model\Resource\Quote\Collection::SELECT_COUNT_SQL_TYPE_CART);
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
Esempio n. 4
0
 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     $collection = $this->_quotesFactory->create();
     if ($this->queryResolver->isSingleQuery()) {
         $collection->prepareForProductsInCarts();
         $collection->setSelectCountSqlType(\Magento\Reports\Model\Resource\Quote\Collection::SELECT_COUNT_SQL_TYPE_CART);
     } else {
         $collection->prepareActiveCartItems();
     }
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
Esempio n. 5
0
 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     /** @var $collection \Magento\Reports\Model\Resource\Quote\Collection */
     $collection = $this->_quotesFactory->create();
     $filter = $this->getParam($this->getVarNameFilter(), array());
     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);
     return parent::_prepareCollection();
 }