When are Magento rule-based product relations worked out?

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.

2 thoughts on “When are Magento rule-based product relations worked out?”

  1. 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!


  2. 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 …

Leave a Reply

Your email address will not be published. Required fields are marked *