1

I have one custom extension installed, and I want to capture its save/update/delete action events and I am not sure how can I capture those events. Please help.

I have successfully able to capture those events for core modules like product and categories but not sure how can I perform the same for the custom extension.

I have tried adding eventPrefix = 'aw_blog' on AW_Blog_Model_Blog class and than in my config.xml file

 <aw_blog_prepare_save>
            <observers>
                <post>
                    <type>singleton</type>
                    <class>post/observer</class>
                    <method>blogBeforeSave</method>
                </post>
            </observers>
        </aw_blog_prepare_save>

but still its not working for me. Please help. Thanks

  • 1
    you have to add mage dispatch event function in you save / update and delete action you can refer this blog link for it inchoo.net/magento/magento-event-driven-programming-tips-tricks – Himanshu Dec 14 '18 at 9:57
  • @Himanshu thanks for the tip , but is it good practice to directly place dispatch event ? I mean in third party extension? – Rahul Makwana Dec 14 '18 at 10:00
  • Yes why not!, because in the end it will be helpful in extending that data. or else you can catch magento's action controller events if you don't want to add dispatch event. – Himanshu Dec 14 '18 at 10:03
  • Accept my answer if it would be helpful for you. – Himanshu Jan 3 at 7:17
0

You have to add mage dispatch event function in your save / update and delete action.

You can refer this blog link for it https://inchoo.net/magento/magento-event-driven-programming-tips-tricks/

OR

You can get magento's action_controller_event
If you don't want to add dispatch event

Hope this will be helpful.

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.