简体   繁体   English

将产品插入其数据库时,修改产品的项目选项存储的 Magento 核心行为

[英]Modify Magento core behavior of item options storage of a product when it is inserted into its database

My products in Magento have a item option that are stored in “sales_flat_quote_item_option” as soon as I add the product to the card.我在 Magento 中的产品有一个项目选项,一旦我将产品添加到卡片中,该选项就会存储在“sales_flat_quote_item_option”中。 This happens when I select this option for the product and I add the product to that cart.当我为产品选择此选项并将产品添加到该购物车时,就会发生这种情况。

I want to know where exactly in Magento's core code is that item option inserted into that table so I can do some extra code there I want to do.我想知道 Magento 核心代码中插入到该表中的项目选项的确切位置,以便我可以在那里做一些我想做的额外代码。 Especifically, I want to save the data in that item option as a file as well.特别是,我也想将该项目选项中的数据另存为文件。

Where can I see this behavior so I can write some more code in there and change it up a bit?我在哪里可以看到这种行为,以便我可以在其中编写更多代码并对其进行一些更改?

If I am not clear, please ask for more information.如果我不清楚,请询问更多信息。 It was kind of complex to describe.描述起来有点复杂。

I found this intresting site which MAY be what I am looking for:我发现这个有趣的网站可能是我正在寻找的:

http://inchoo.net/ecommerce/magento/dispatching-before-and-after-events-to-magento-core-actions/ http://inchoo.net/ecommerce/magento/dispatching-before-and-after-events-to-magento-core-actions/

Thank you谢谢

You could use help of Magento event-observer functionlity.您可以使用 Magento 事件观察器功能的帮助。

Hopefully this can help!希望这可以帮助!

http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/customizing_magento_using_event-observer_method http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/customizing_magento_using_event-observer_method

Let me know if you need more help on this!如果您需要更多帮助,请告诉我!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM