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.
So I dug around the product link data a bit. The relevant object we're looking at here is catalog/product_link
, which the catalog/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
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 ...
精彩评论