被遗弃的购物车报告在哪里位于Magento?

Jos*_*ton 13 report magento

我想看看废弃的购物车报告是如何生成的(它使用的是什么型号).

我希望增加分割客户名字和姓氏的能力,因为我们想用它将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)

  • 当你解决自己的问题时发布回复,并感谢你不是一个无助的Magento用户! (8认同)
  • 我总是尽力回应自己的问题.我不可能是唯一有这些问题的人.作为一名程序员,我有时会觉得Magento有点失败,所以我尽力帮助.非常感谢您对社区的贡献.你的教程对我的帮助比你知道的多. (4认同)