I have an module A will save a product using


This module will run in cron job.

And another module B has


Anyone know module A will or will not trigger module B function?

1 Answer 1


Yes, definitely, if you check the save function of Mage_Core_Model_Abstract you can see this:

public function save()
     * Direct deleted items to delete method
    if ($this->isDeleted()) {
        return $this->delete();
    if (!$this->_hasModelChanged()) {
        return $this;
    $dataCommited = false;
    try {
        if ($this->_dataSaveAllowed) {
        $this->_getResource()->addCommitCallback(array($this, 'afterCommitCallback'))
        $this->_hasDataChanges = false;
        $dataCommited = true;
    } catch (Exception $e) {
        $this->_hasDataChanges = true;
        throw $e;
    if ($dataCommited) {
    return $this;

This line: $this->_beforeSave(); triggers the following events:

  • model_save_before
  • $this->_eventPrefix.'_save_before' where the event prefix depends on your model. In your case, it is catalog_product

On the other hand, this line: $this->_afterSave() triggers the following events:

  • model_save_after
  • $this->_eventPrefix.'_save_after' (same remark as before)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.