Created
June 17, 2014 20:22
-
-
Save rodrigowebjump/744c8e48c2849cfbf957 to your computer and use it in GitHub Desktop.
Prevenir um observer de ser executado múltiplas vezes no magento.
Ref: http://stackoverflow.com/questions/10841208/prevent-the-trigger-of-observer-in-magento
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function myObserver(Varien_Event_Observer $observer) | |
{ | |
if (Mage::registry('my_observer_has_run')) { | |
return $this; | |
} | |
.... Your Code Here .... | |
Mage::register('my_observer_has_run', true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment