OK, so a lot of people are asking about changing the Contact Page in the default OpenCart system so it doesn’t so…well, crap! I was going to write a short blog post about redesigning the page with stuff that is already there but I thought I would do it properly and show you a method of creating several different contact forms which you could use throughout your OpenCart website.
So, I will be creating three different contact forms:
-
Lead Generation Form
This will be a form which sits on the homepage and encourages visitors to sign up to your Newsletter, RSS Feed or some other Lead Gen method. -
Request A Quote Form
Another popular request for OpenCart users, this will be a form which sits next to the product description which usrs can fill out for more information, or a quote, to be sent to them by the Store Owner. -
A Bespoke Contact Form
I will be replacing the original OpenCart contact page with a bespoke Information page with a new contact form. By doing it this way, we can define exactly how the contact page looks!
We will build up the forms individually and then build a PHP file to handle the different requests with an “IF” statement so we keep it all together. You will be able to customise the emails that get sent in the forms of confirmations to fit with your branding.
Adding a Sign Up form to the OpenCart homepage for Lead Generation
So, first we are going to be making up the form which will sit on the OpenCart homepage and allows your customers to sign up and for you to start getting leads from your store. In this example I will creating a Newsletter Form which only requires the visitors full name and email address.
The form itself is pretty standard and you only need a bit of HTML knowledge to make one up, the form I will make will be unstyled but remember you can give each input type a different class to style them with the OpenCart CSS file to make it look how you want!
Building The Lead Generation Form
Open us this file:
- catalog/view/theme/[YOUR THEME]/template/common/home.tpl
And add in your form wherever you want it to appear on the home page. Simply follow the structure as shown below: