dirtrider118 Posted September 6, 2017 Share Posted September 6, 2017 (edited) Hello, I'm trying to make two contact forms that require different information from the customer for each one. I have tried duplicating and modifying some values in the following files: ContactController.php Contact.php contact-form.tpl email templates (after i get the template file to display) but I can't get the the duplicate file contact-form2.tpl to display. Can someone help me modify the controller(s) so it points to my contact-form2.tpl? Is there any other files involved? ex. the duplicate url to access contact-form2.tpl would be http://www.example.com/index.php?controller=contact2 Thanks! Prestashop 1.6.1.16 Edited September 6, 2017 by dirtrider118 (see edit history) Link to comment Share on other sites More sharing options...
dirtrider118 Posted September 7, 2017 Author Share Posted September 7, 2017 (edited) Figured it out. For anyone wanting two contact forms: Duplicate ContactController.php and rename to ex. NewContactController Change class name from ContactControllerCore to ex. NewContactControllerCore Change the php self variable to ex. newcontact on line 29 Duplicate contact-form.tpl and rename to ex. new-contact-form.tpl Point to your new template file by editing $this->setTemplate(_PS_THEME_DIR_.'contact-form.tpl'); on line 255 Delete class_index.php in cache folder in root directory Login to admin backend and add page to SEO & URLS. Access the page URL by http://example.com/index.php?controller=newcontact This is how i got a second contact page to display. Adding new form fields and variables is up to you. Cheers! Edited September 7, 2017 by dirtrider118 (see edit history) 2 Link to comment Share on other sites More sharing options...
josecarre Posted November 29, 2017 Share Posted November 29, 2017 (edited) Man, so many thanks, this was really helpful to me. edit: tested and works in ps 1.6.1.17 Edited November 29, 2017 by josecarre add presta version (see edit history) Link to comment Share on other sites More sharing options...
ukbaz Posted July 5, 2019 Share Posted July 5, 2019 Will this work in Prestashop 1.7 or are there more files to edit? Thanks Baz Link to comment Share on other sites More sharing options...
Alina007 Posted October 24, 2019 Share Posted October 24, 2019 On 7/5/2019 at 3:45 PM, ukbaz said: i am interested in this response too....thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now