废弃购物车报告位于 Magento 的哪里?

发布于 2024-09-19 11:23:52 字数 134 浏览 4 评论 0原文

我想看看废弃的购物车报告是如何生成的(它使用的模型)。

我希望添加分离客户名字和姓氏的功能,因为我们想用它来将信息从 Magento 导入到我们的电子邮件列表管理程序中。

有谁知道这个报告是从哪里生成的或者它使用什么对象?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜宝宝 2024-09-26 11:23:52

我发现网格是在以下位置生成的:

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

从那里我能够找到用于废弃购物车的模型是:

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

我能够通过向 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
        ));

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
        ));
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文