Magento Request for Quote Form

There is an easy way to repurpose Magento’s contact form into a request for quote form.
There are three steps to creating this request for quote form:
The first step is to create a copy of the contacts/form.phtml template and rename it quote-form.phtml.
Place it in your themes app/design/fronted/customtheme/default/template/contacts/ folder.
Open up the quote-form.phtml file and add a hidden form field with a name of quote and value of 1, like so:

<input type="hidden" name="quote" value="1" />

This is going to allow us to use some conditional logic to display different labels to the values that come via the form submission.
Also change the input labels as needed for your RFQ.
Here is a reference file to use as a guide.
Quote Form (404)
The next step is to place this template inside a cms page. So create a cms page called quote-form and paste the contact form inside there with the following inside double curly brackets:
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/quote-form.phtml"}}

Here is screenshot of your new form.


Once your cms page is displaying the contact form, we’ll move on to step three, which is modifying the contact form email template in System > Transactional Emails.
Create a new contact form template by selecting the Contact Form template, loading it, and modifying it per the above reference file.
The important parts are

{{if data.quote}}

This allows you to use conditional logic to display a different message for contact form submissions and request for quote submissions.
Here is reference file to use as a guide for using this logic.
email template (400)

Once you have saved the new custom contact email template, assign it to the contact form in System > Config > General > Contacts.

Using the new quote-form.phtml and the new email template with some logic, you should receive Request for Quote submissions like this after submitting Request For Quote form:

Contact Type: Quote Request

Name: Your Name Here


Telephone: 000-000-0000

Requirement: I need 500 blue widgets, model #1234 with expedited 
delivery this month and another 1000 red widgets, model 1235 next 
month via normal delivery. 
What is your price for product and delivery?


New Customer

Your client should love the new quote form and it should help them get and keep new customers.

So, now that you’ve completed that task, relax and have a cold one of your choice.

Good Luck!

This entry was posted in Magento. Bookmark the permalink.