Skip to content

Commit b3d8bee

Browse files
author
Roman Ganin
committed
Merge remote-tracking branch 'origin/MAGETWO-36857' into develop
2 parents f195828 + cba1bf8 commit b3d8bee

File tree

9 files changed

+713
-262
lines changed

9 files changed

+713
-262
lines changed

app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
/**
99
* Adminhtml abandoned shopping carts report grid block
1010
*
11+
* @method \Magento\Reports\Model\Resource\Quote\Collection getCollection
12+
*
1113
* @author Magento Core Team <core@magentocommerce.com>
1214
* @SuppressWarnings(PHPMD.DepthOfInheritance)
1315
*/

app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart
1616
/**
1717
* @var \Magento\Reports\Model\Resource\Quote\CollectionFactory
1818
*/
19-
protected $_quotesFactory;
19+
protected $quoteItemCollectionFactory;
2020

2121
/**
2222
* @var \Magento\Quote\Model\QueryResolver
@@ -26,18 +26,18 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart
2626
/**
2727
* @param \Magento\Backend\Block\Template\Context $context
2828
* @param \Magento\Backend\Helper\Data $backendHelper
29-
* @param \Magento\Reports\Model\Resource\Quote\CollectionFactoryInterface $quotesFactory
29+
* @param \Magento\Reports\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollectionFactory
3030
* @param \Magento\Quote\Model\QueryResolver $queryResolver
3131
* @param array $data
3232
*/
3333
public function __construct(
3434
\Magento\Backend\Block\Template\Context $context,
3535
\Magento\Backend\Helper\Data $backendHelper,
36-
\Magento\Reports\Model\Resource\Quote\CollectionFactoryInterface $quotesFactory,
3736
\Magento\Quote\Model\QueryResolver $queryResolver,
37+
\Magento\Reports\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollectionFactory,
3838
array $data = []
3939
) {
40-
$this->_quotesFactory = $quotesFactory;
40+
$this->quoteItemCollectionFactory = $quoteItemCollectionFactory;
4141
$this->queryResolver = $queryResolver;
4242
parent::__construct($context, $backendHelper, $data);
4343
}
@@ -56,7 +56,8 @@ protected function _construct()
5656
*/
5757
protected function _prepareCollection()
5858
{
59-
$collection = $this->_quotesFactory->create();
59+
/** @var \Magento\Reports\Model\Resource\Quote\Item\Collection $collection */
60+
$collection = $this->quoteItemCollectionFactory->create();
6061
$collection->prepareActiveCartItems();
6162
$this->setCollection($collection);
6263
return parent::_prepareCollection();
@@ -68,11 +69,11 @@ protected function _prepareCollection()
6869
protected function _prepareColumns()
6970
{
7071
$this->addColumn(
71-
'entity_id',
72+
'product_id',
7273
[
7374
'header' => __('ID'),
7475
'align' => 'right',
75-
'index' => 'entity_id',
76+
'index' => 'product_id',
7677
'sortable' => false,
7778
'header_css_class' => 'col-id',
7879
'column_css_class' => 'col-id'
@@ -146,6 +147,6 @@ protected function _prepareColumns()
146147
*/
147148
public function getRowUrl($row)
148149
{
149-
return $this->getUrl('catalog/product/edit', ['id' => $row->getEntityId()]);
150+
return $this->getUrl('catalog/product/edit', ['id' => $row->getProductId()]);
150151
}
151152
}

0 commit comments

Comments
 (0)