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
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>
-
-
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
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