Magento事件观察员批量进口产品 [英] Magento event observer for bulk import for products

查看:148
本文介绍了Magento事件观察员批量进口产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有批量导入产品/客户的事件?

Is there any event for "bulk import of products/customers"?

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

I intend to make a module for my vendors to upload their product information in xml/csv through the backend. When they upload, I need to update my Solr records.

Thanx

推荐答案

您可以在config.xml中覆盖Mage_Catalog_Model_Convert_Adapter_Product :: saveRow():

1>

You can override the Mage_Catalog_Model_Convert_Adapter_Product::saveRow() as:
1> in 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>

2>将类文件创建为

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..
    }
}

注意:这只是一个想法,你需要自己开发完整的工作模块。

Note: This is just an idea, you need to develop full working module by yourself.

感谢

注意

MagePsycho

Thanks
Regards
MagePsycho

这篇关于Magento事件观察员批量进口产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆