Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is The Abandoned Cart Report Located in Magento?

Tags:

magento

report

I would like to see how the abandoned shopping cart report is being generated from (what models it is using).

I am hoping to add the ability to split out the customers first and last names since we want to use this to import the information from Magento into our email list management program.

Does anyone know where this report is generated from or what object it uses?

like image 262
Josh Pennington Avatar asked Sep 17 '10 19:09

Josh Pennington


People also ask

What is abandoned cart in Magento?

Abandoned Cart extension for Magento 2 allows you to trigger automated reminders to visitors who left your store without purchasing. Just preselect a notification layout suitable for your business strategy and motivate users to complete the purchases.

How do I enable abandoned cart in Magento 2?

Go to STORES > Configuration > Dotdigital > Abandoned Carts, and select whether you are setting these up for Customers or Guests.

How do I find out my cart abandonment rate?

How is abandoned cart rate calculated? Shopping Cart Abandonment Rate is calculated by dividing the total number of completed transactions by the number of initiated sales. (adds to basket) . You then subtract the result from one and then multiply by 100 to find your abandonment rate.


1 Answers

I found the grid was being generated in the following location:

/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php

From there I was able to find the model being used for the abandoned shopping carts was:

$collection = Mage::getResourceModel('reports/quote_collection');
$collection->prepareForAbandonedReport(array(1));
$collection->load();

I was able to get my end goal done by adding two column to the Grid.php file. I did that by doing the following:

$this->addColumn('customer_firstname', array(
            'header'    =>Mage::helper('reports')->__('Customer First Name'),
            'index'     =>'customer_firstname',
            'sortable'  =>false
        ));

        $this->addColumn('customer_lastname', array(
            'header'    =>Mage::helper('reports')->__('Customer Last Name'),
            'index'     =>'customer_lastname',
            'sortable'  =>false
        ));
like image 191
Josh Pennington Avatar answered Oct 27 '22 20:10

Josh Pennington