您好尝试让 2 个扩展在销售订单网格、Amasty 的批量订单操作和 Orders2CSV 中工作。
就目前而言,Orders2CSV 在列表中并且工作正常。它具有以下代码来覆盖 Sales_Order_Grid:
<?php
/**
* Ext4mage Orders2csv Module
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to Henrik Kier <info@ext4mage.com> so we can send you a copy immediately.
*
* @category Ext4mage
* @package Ext4mage_Orders2csv
* @copyright Copyright (c) 2012 Ext4mage (http://ext4mage.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @author Henrik Kier <info@ext4mage.com>
* */ class Ext4mage_Orders2csv_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid { const XPATH_CONFIG_SETTINGS_IS_ACTIVE = 'orders2csv/settings/is_active';
protected function _prepareMassaction() {
parent::_prepareMassaction();
if (Mage::getStoreConfig(self::XPATH_CONFIG_SETTINGS_IS_ACTIVE)) {
$this->getMassactionBlock()->addItem('orders2csv', array(
'label'=> Mage::helper('sales')->__('Orders2CSV'),
'url' => $this->getUrl('*/sales_order_orders2csv/makecsv'),
));
} } } ?>
然而,我相信 MassActions 具有以下内容,而不是覆盖它添加到其中的原始块:
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) 2010-2011 Amasty (http://www.amasty.com)
* @package Amasty_Oaction
*/
class Amasty_Oaction_Block_Adminhtml_Widget_Grid_Massaction extends Mage_Adminhtml_Block_Widget_Grid_Massaction
{
public function isAvailable()
{
Mage::dispatchEvent('am_grid_massaction_actions', array(
'block' => $this,
'page' => $this->getRequest()->getControllerName(),
));
return parent::isAvailable();
}
public function getJavaScript()
{
$result = new Varien_Object(array(
'js' => parent::getJavaScript(),
'page' => $this->getRequest()->getControllerName(),
));
Mage::dispatchEvent('am_grid_massaction_js', array('result' => $result));
return $result->getJs();
}
}
知道如何将 MassAction 代码添加到 Orders2CSV 代码中吗?
任何帮助将不胜感激
安迪