Issue
I am creating a new extension in Magento version 2. Now I need to get abandoned carts report details. How can I retrieve this data?
Solution
Finally I found the way to get the abandoned cart details. Here is the code.
$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();
Answered By - Prakash Arul Mani Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.