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 t开发者_如何转开发o 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?
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
));
精彩评论