0

I am using this event: controller_action_predispatch_sales_order_create_showUpdateResult

this is my xml code:

    <controller_action_predispatch_sales_order_create_showUpdateResult>
        <observers>
            <mynamespace_mymodule_controller_action_predispatch_sales_order_create_showUpdateResult>
                <class>Mynamspace_Mymodule_Model_Observer_MyClass</class>
                <method>myMethod</method>
            </mynamespace_mymodule_controller_action_predispatch_sales_order_create_showUpdateResult>
        </observers>
    </controller_action_predispatch_sales_order_create_showUpdateResult>

This is my class:

class Mynamspace_Mymodule_Model_Observer_MyClass
{

    public function myMethod($observer)
    {
        Mage::log('Tralala', Zend_Log::ERR, 'mylog.log', true);
    }
}

This is the controller from ajax :sales_order_create/showUpdateResult/. It s about updating the items from cart from adminpanel. I would like to trigger an observer when that ajax request is called. For some reason it doesn;t work. What am I missing ?

Thank you

1
  • have you tried to print route name in your controller ?? Mar 27, 2018 at 12:54

2 Answers 2

0

Please try adding:

<type>singleton</type>

along with <class/> and <method/>.

I'm not sure what the default value of type is, but the examples given in Magento dev docs set it to "singleton".

0

I moved my observer form <adminhtml> to the <global> and changed my event from

<controller_action_predispatch_sales_order_create_showUpdateResult>

to

<controller_action_predispatch_adminhtml_sales_order_create_showUpdateResult>

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.