Jump to content

How to create a contact form for customers using both html and php in Prestashop?


Recommended Posts

Hi guys, 

 

Currently, I have abit of a problem. I have created a contact form for the customers to fill in and include their feedback to be sent via email to my company. 

 

Example:

 

Name: John

Email: [email protected]

Contact: 97687656

Feedback: Too messy!

 

(This form is to be sent to my HR Management email) 

 

I have no problems with the html part. The only problem now is that I don't know where to put the php code. Hoping for you guys' swift reply. Thanks.

Link to comment
Share on other sites

hello

 


 

I have created a contact form for the customers to fill in and include their feedback to be sent via email to my company. 

 

where you created it? 

in what file?

 

you want to create totally new contact form page?

or maybe edit current default contact form as Nemo suggested?

Link to comment
Share on other sites

if you wnato to create it on cms page, you have to modify CmsController.php

inside init(); function add php script to send an email.

 

something like:

if (Tools::isSubmit($_POST['send_my_email'])){
script to send email here
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...