1

I have a lot of observers that work like that:

<controller_action_postdispatch_checkoutopt_index_pagamento>
    <observers>
        <auto_invoice_order>
            <type>singleton</type>
            <class>IsabelaFlores_SGPico_Model_Observer</class>
            <method>acessarCheckoutPagamento</method>
        </auto_invoice_order>
    </observers>
</controller_action_postdispatch_checkoutopt_index_pagamento>

Where checkoutopt_index_pagamento: page`s URL with _ instead of /, and all of it worked fine, until now.

The problem: I have to put an observer to a checkout page with URL "checkoutopt/index/revisao", but file path "onestepcheckout/onestep.phtml" and it isn't working.

I already try to use onestepcheckout_onestep, onestepcheckout_onestep_index, onestepcheckout_onestep_index_revisao, onestepcheckout_onestep_revisao, and a lot of others combinations.

How exactly could I define a observer to this page?

0

If you look in the core code, you will find that this kind of event is dispatched in app/code/core/Mage/Core/Controller/Varien/Action.php::postDispatch() with

Mage::dispatchEvent(
     'controller_action_postdispatch_'.$this->getFullActionName(),
     array('controller_action'=>$this)
);

So, you have to find out what is the result of $this->getFullActionName(). This will be routeName_controllerName_actionName. For a fast debug, you could log it with some Mage::log($this->getFullActionName()) in this method and access the url you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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