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?

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>
  • It was helpful post – Ahmad Vaqas Khan Aug 26 '17 at 7:04
  • Hello Can you share this in detail with path where I need to create xml and post data file ? – David Coder May 23 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, privacy policy and cookie policy

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