我想看看废弃的购物车报告是如何生成的(它使用的是什么型号).
我希望增加分割客户名字和姓氏的能力,因为我们想用它将Magento中的信息导入我们的电子邮件列表管理程序.
有谁知道这个报告的生成地点或它使用的对象是什么?
Jos*_*ton 19
我发现网格是在以下位置生成的:
/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
从那里我能够找到用于废弃购物车的模型是:
$collection = Mage::getResourceModel('reports/quote_collection');
$collection->prepareForAbandonedReport(array(1));
$collection->load();
Run Code Online (Sandbox Code Playgroud)
通过向Grid.php文件添加两列,我能够完成最终目标.我通过执行以下操作来做到这一点:
$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
));
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7569 次 |
最近记录: |