Magento 基于规则的产品关系何时制定?
Magento 基于规则的产品关系(向上销售、交叉销售等)存储在数据库表中,我假设它们偶尔会更新一次。不幸的是,我找不到任何有关何时发生或触发它的文档。是不是:
- 像块一样被缓存,并在一定时间后过期?
- 每当您保存产品时生成?
- 由 CRON 生成?
我真的很感激有人能为我填补空白。我正在使用企业版,如果这有帮助或有什么不同的话。
Magento's rule-based product relations (up-sell, cross-sell etc) are stored in a database table, and I assume they are updated once in a while. Unfortunately, I can't find any documentation about when that happens or what triggers it. Is it:
- Cached, like a block, and expires after a certain time?
- Generated whenever you save a product?
- Generated by CRON?
I'd really appreciate it is someone could fill in the blanks for me. I'm using the Enterprise edition, if that helps or makes any difference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所以我挖掘了一下产品链接数据。我们在这里查看的相关对象是
catalog/product_link
,catalog/product
对象使用它来检索链接的对象数据。虽然分组和捆绑产品似乎在 cronjobs 中写入此数据,但我还没有发现任何将这些数据写入到实际追加销售/交叉销售产品的 cron-job 中的情况。我会继续挖掘一下,但这似乎意味着产品是在节省时间时计算的。
希望有帮助!
谢谢,
乔
So I dug around the product link data a bit. The relevant object we're looking at here is
catalog/product_link
, which thecatalog/product
object uses to retrieve linked object data.While grouped and bundle products seem to write to this in cronjobs, I have not found any cases where this data is written in a cron-job for actual upsell/cross-sell products. I will keep digging a bit, but this seems to imply that the products are calculated at save time.
Hope that helps!
Thanks,
Joe
搜索事件“catalog_product_save_before”和“catalog_product_save_after”的观察者,以在项目中查看事件何时触发以及调用什么函数。
在企业版中,触发的观察者是 enterprise_targetrule/observer,功能:catalogProductAfterSave ...
Search for the observers on events "catalog_product_save_before" and "catalog_product_save_after" to see in your project when it is fired and what function is called.
In the enterprise edition the observer fired is enterprise_targetrule/observer, function : catalogProductAfterSave ...