Magento 如何添加附加字段以导出订单 csv
Magento How to add additional fields to export order csv
我正在尝试将其他字段添加到 magento 后端订单的导出订单中。
我用谷歌搜索了一般信息以添加新字段...
protected function _prepareCollection(){
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id',array('postcode'));
$this->setCollection($collection);
return parent::_prepareCollection();
}
protected function _prepareColumn() {
$this->addColumn('postcode', array(
'header' => Mage::helper('sales')->__('Postcode'),
'index' => 'postcode',
));
然而,当我尝试编辑 /var/www/html/app/code/local/mage/adminhtml/block/sales/order/grid.php 时,没有任何反应。我想我可能编辑了错误的文件或者某些东西可能超过了 grid.php。我如何找出哪些文件覆盖了它?我的网站是 fs1inc.com。提前感谢您的帮助。
请尝试以下解决方案
kindly visit below URL, download and install this "OrdersPlus", no
need to add custom code. I have tested It's working magento 1.7 to 1.9.3.1
https://github.com/gsafcik/OrdersPlus
希望对你有所帮助。
我正在尝试将其他字段添加到 magento 后端订单的导出订单中。
我用谷歌搜索了一般信息以添加新字段...
protected function _prepareCollection(){
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id',array('postcode'));
$this->setCollection($collection);
return parent::_prepareCollection();
}
protected function _prepareColumn() {
$this->addColumn('postcode', array(
'header' => Mage::helper('sales')->__('Postcode'),
'index' => 'postcode',
));
然而,当我尝试编辑 /var/www/html/app/code/local/mage/adminhtml/block/sales/order/grid.php 时,没有任何反应。我想我可能编辑了错误的文件或者某些东西可能超过了 grid.php。我如何找出哪些文件覆盖了它?我的网站是 fs1inc.com。提前感谢您的帮助。
请尝试以下解决方案
kindly visit below URL, download and install this "OrdersPlus", no need to add custom code. I have tested It's working magento 1.7 to 1.9.3.1
https://github.com/gsafcik/OrdersPlus
希望对你有所帮助。