Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Events 产品批量导入的Magento事件观察者_Events_Magento_Observer Pattern - Fatal编程技术网

Events 产品批量导入的Magento事件观察者

Events 产品批量导入的Magento事件观察者,events,magento,observer-pattern,Events,Magento,Observer Pattern,是否有“批量进口产品/客户”的活动 我打算为我的供应商制作一个模块,通过后端以xml/csv格式上传他们的产品信息。当他们上传时,我需要更新我的Solr记录 Thanx您可以将Mage\u目录\u模型\u转换\u适配器\u产品::saveRow()覆盖为: 1> 在config.xml中 <global> <models> ... <catalog> <rewrite>

是否有“批量进口产品/客户”的活动

我打算为我的供应商制作一个模块,通过后端以xml/csv格式上传他们的产品信息。当他们上传时,我需要更新我的Solr记录


Thanx

您可以将Mage\u目录\u模型\u转换\u适配器\u产品::saveRow()覆盖为:
1> 在config.xml中

<global>
    <models>
...
        <catalog>
            <rewrite>
                <!-- Override Mage_Catalog_Model_Convert_Adapter_Product -->
                <convert_adapter_product>MagePsycho_Productimport_Model_Convert_Adapter_Product</convert_adapter_product>
            </rewrite>
        </catalog>
...
    </models>
</global>
注意:这只是一个想法,您需要自己开发完整的工作模块。

谢谢
问候

什么是“产品/客户的批量进口”?你是说系统->导入/导出工具吗?是的。。。我需要一种在后端缓存这个“导入/导出”工具的方法。谢谢你。这个想法奏效了。尽管我也不得不超越其他几个型号:
class MagePsycho_Productimport_Model_Convert_Adapter_Product extends Mage_Catalog_Model_Convert_Adapter_Product
{    
    public function saveRow(array $importData)
    {
      parent::saveRow($importData);
      //do your extra stuffs here..
    }
}