【问题标题】:Available stock in Magento Product Ordered ReportMagento 产品订购报告中的可用库存
【发布时间】:2015-02-04 00:33:05
【问题描述】:

我希望能够在产品订购报告中查看某件商品的当前库存。因此,您可以在同一个屏幕上查看该商品的销售月份以及我还剩多少。

我已经修改了 \app\code\core\Mage\Adminhtml\Block\Report\Product\Sold\Grid.php

添加:

 $this->addColumn('qty', array(
        'header'    =>Mage::helper('reports')->__('Stock Qty'),
        'width'     =>'120px',
        'align'     =>'right',
        'index'     =>'qty',
        'type'      =>'number'
    ));

但它会显示一个空列

【问题讨论】:

  • 有人吗?请帮忙
  • 两个网格可以联合吗?

标签: php magento magento-1.9.1


【解决方案1】:

Qty 是对应于产品的列,而销售订单网格对应于销售表。你能做什么:

1) 以编程方式创建销售订单属性。 2) 在 sales_order_place_after 上写一个观察者,并根据下订单后可用的产品库存设置该属性的值。 3) 在 Grid.php 中,添加自定义销售属性的列名而不是数量。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-18
    • 2013-06-27
    相关资源
    最近更新 更多