2

I need to pass information from the Magento Contact Form to a CRM system. I was wondering does anyone know if there is an observer that can be triggered to pass the form information to the CRM via the SOAP API?

2 Answers 2

7

When using an observer for the event controller_action_postdispatch_contacts_index_post you can access the Post-Data via

public function controllerActionPostdispatchContactsIndexPost(Varien_Event_Observer $observer)
{
    $data = $observer->getData();
    $post = $data['controller_action']->getRequest()->getPost();
}

To listen for the event create the those nodes in the config.xml of your Module:

config/global/events/

<controller_action_postdispatch_contacts_index_post>
    <observers>
        <company_modulename_controller_action_postdispatch_contacts_index_post>
            <class>company_modulename/observer</class>
            <method>controllerActionPostdispatchContactsIndexPost</method>
        </company_modulename_controller_action_postdispatch_contacts_index_post>
    </observers>
</controller_action_postdispatch_contacts_index_post>
2
  • It was helpful post Aug 26, 2017 at 7:04
  • Hello Can you share this in detail with path where I need to create xml and post data file ? May 23, 2019 at 13:29
3

There is no particular event dispatched when the contact form is filled.

but there might be a default controller like

controller_action_postdispatch_contacts_index_post

Your Answer

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

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