在Magento 2 - 如何检索被遗弃的购物车细节?

Pra*_*ani 4 magento2 magento-2.0 magento2.0.2

我正在Magento版本2中创建一个新的扩展.现在我需要获取废弃的购物车报告详细信息.我搜索了许多网站,但仍未获得如何检索此数据的解决方案.

所以请帮助我获取废弃的购物车报告数据.

谢谢

Pra*_*ani 7

最后,我找到了获取废弃购物车细节的方法.这是代码.

$om = \Magento\Framework\App\ObjectManager::getInstance();

$collection = $om->get('Magento\Reports\Model\ResourceModel\Quote\Collection');
$store_id = $this->storeManager->getStore()->getId();
$collection->prepareForAbandonedReport([$store_id]);
$rows = $collection->load();
Run Code Online (Sandbox Code Playgroud)