Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Contact Forms on Magento

I'm looking to create a new contact form for enquiries on Magento. Creating a module from scratch for this seems like a bit of a waste of time. Does anyone know the most sensible and quickest way for this to happen?

Thanks!

like image 503
Michael Watson Avatar asked Mar 16 '11 14:03

Michael Watson


2 Answers

In CMS>Manage Pages create and enable a new page (or you could use a static block) e.g. call the page My Contact Form with a url ID of my-contact-form and a layout that matches your theme. For the content of the new page add

{{block type='core/template' template='contacts/mycontactform.phtml'}}

Now in your template folder (app/design/frontend/default/default/template/contacts for default theme in Magento 1.3.x) copy the existing form.phtml file, rename it to mycontactform.phtml and copy it back to the contacts folder. Edit the new mycontactform.phtml code and html as you wish to create your new contact form.

Load the new form by going to http://www.example.com/my-contact-form

Hope that helps...

like image 111
paj Avatar answered Oct 08 '22 08:10

paj


In adendum to paj answer: You also have to edit the email template to include whatever new fields you just added.

Keep in mind that both your new contact form and Magento original contact form (an whatever future contact forms you may add in the future with in this way) will all use the same email template.

So in order to have meaningful emails sent, you need to "program" the template using the {{depend}} directive

like image 20
barbazul Avatar answered Oct 08 '22 10:10

barbazul