在 Magento 管理员仪表板上将客户更改为公司

发布于 2024-12-22 03:02:21 字数 353 浏览 0 评论 0原文

在 Magento 管理员仪表板上,我希望更新“最后 5 个订单”块,以便它不显示客户名称,而是显示公司帐单名称。

我的理解是,这不能使用标准报告集合来完成,我已经在主销售网格屏幕上看到了执行此操作的示例,但在仪表板上却没有。为了增加进一步的复杂性,这是针对 Magento 1.6.1.0 的最新版本,并且似乎执行此操作的方法可能在 1.4 左右的某个地方发生了变化。

我认为需要编辑的文件是:

app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php

希望这是许多人可以从中受益的“当您知道如何操作时很容易”的解决方案之一。

On the Magento administrator Dashboard I'm looking to update the 'Last 5 Orders' block so that instead of displaying the customer name, it shows the company billing name instead.

My understanding is that this can't be done using the standard reports collection, I've seen examples for doing this on the main sales grid screen, but not on the dashboard. To add further complexity this is for the latest version of Magento 1.6.1.0 and it appears the method of doing this may have changed somewhere around 1.4.

The file I believe needs editing is:

app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php

Hopefully this is one of those 'easy when you know how' solutions that lots of people can benefit from.

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

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

发布评论

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

评论(1

阳光下慵懒的猫 2024-12-29 03:02:21

这是代码
PS:我没有时间测试这个代码块。

代码块可在:

app\code\core\Mage\Adminhtml\Block\Dashboard\Tab\Customers\Most.php

protected function _prepareColumns()
{
    $this->addColumn('name', array(
        'header'    => $this->__('Customer Name'),
        'sortable'  => false,
        'index'     => 'name'
    ));

    $this->addColumn('orders_count', array(
        'header'    => $this->__('Number of Orders'),
        'sortable'  => false,
        'index'     => 'orders_count',
        'type'      => 'number'
    ));

这是您可以覆盖 magento 管理销售网格的示例链接
覆盖管理员销售订单搜索网格

Here is the code
PS : I haven't got time to test this code block.

The code block available in the :

app\code\core\Mage\Adminhtml\Block\Dashboard\Tab\Customers\Most.php

protected function _prepareColumns()
{
    $this->addColumn('name', array(
        'header'    => $this->__('Customer Name'),
        'sortable'  => false,
        'index'     => 'name'
    ));

    $this->addColumn('orders_count', array(
        'header'    => $this->__('Number of Orders'),
        'sortable'  => false,
        'index'     => 'orders_count',
        'type'      => 'number'
    ));

and here is the sample link that you can override the magento admin sales grid
Override Admin Sales Order Search Grid

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