We use cookies to enhance your experience when visiting our website. For more information, click here.
Mentions légales
×

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

Cookie NameAccept
GDPR PRO - Règlement sur la protection des données générales - tout en 1 This modules helps the site to become GDPR Compliant by adding the law compliant features.

Prestashop modify contact form: how to do it and who is the best ?

Welcome to the intervention specialist on Prestashop.
Web2007 is at your entire disposal for ALL your Prestashop needs.

Prestashop (1.7). How do I edit the fields of my contact form ?

Prestashop provides a page with a contact form that allows users and visitors to your store to communicate with you. However, this form is not very customizable. This form can be customized as we will see below. We are going to add an additional field to our example, but the procedure also allows us to delete or modify existing fields. To add a field, we will first modify the model. This will allow us to retrieve the template from your theme (parent theme), or directly from the prestashop "contactform" module. This file can now be edited. You can add a "Phone" field, for example. The second step is to extend the "ContactForm" class to replace the "contactform" module.
Prestashop integrator, , Prestashop project quote, , Create Prestashop online store, , Prestashop consultant, , Prestashop Webmaster

To join Web2007:

Contact form

Modification of the contact form in PrestaShop 1.6.

PrestaShop 1.6 lets you create a page that contains a contact form. Although this form is sufficient for most cases, it is often necessary to modify or add fields to meet the needs of projects. PrestaShop provides a simple and efficient contact page by default. PrestaShop 1.6 has a contact form which allows customers to send basic information. You may need additional information, such as customer first and last name, company name, and phone number, as required fields. You can also remove the send files function as well as the reference field. This example uses the Default-Bootstrap theme from PrestaShop 1.6.1.6. However, the work can be applied to any 1.6 version of PrestaShop.
Prestashop Fatal Error, , Prestashop edit invoice, , Prestashop product image not showing, , Prestashop blank page, , Facebook Prestashop conversion pixel

The know-how

+

19 Certificates !

+

+15 years of experience

+

Modify the Prestashop default contact form.

After installing Prestashop 1.7, which only takes a few minutes, your e-commerce site is fully functional. There are still a few things to do if your brand colors are not present in the site interface. We're going to focus on the contact form, which is an essential part of any e-commerce site. It is the first point of contact between you and your customers. Prestashop automatically provides a contact form. It has the standard fields "Subject", "Email address", "Attachment" (if the customer wants to send you a file) and "Message". You may need to change the appearance or add fields depending on the activity.
Prestashop Specialist, , Prestashop expert, , Referencing Prestashop site on Google, , Prestashop SEO Agency, , Freelancer Prestashop

Thanks to new technology,
WEB2007 is fair Next to you !
Appointment fast in video:

Modify the contact form in Prestashop.xx

The basic Prestashop contact form is not for you if you are like me. It lacks the necessary fields to quickly contact a prospect such as name and telephone number. Whatever your reason, you can edit this form. To directly see the changes we make in Prestashop, disable the cache. Let's add the phone number and name fields (which will be required to send an email), by typing: - Edit the contact form.tpl file located in your theme folder. These fields should be displayed in the form at this point, but they are not usable. - Then edit the contact.html or contact.txt files located in the /mails/ folder Prestashop will now display the fields in the emails, but they will not be filled. You can also modify the contact_form.html or contact_form.txt files. These are the confirmations that customers will receive by email. They also contain the fields that you want to delete.
Migrate Prestashop to Woocommerce, , err_too_many_redirects Prestashop SSL, , Prestashop antivirus, , Prestashop boost speed, , Prestashop POS

Trust Web2007 !

Project payment
by step

Quotes
clear and precise

Edit Prestashop contact controller.

The Prestashop contact form controller defines the fields that will be processed, the required fields, and the links to the Smarty variables. You need to copy the file /controllers/front/ContactController.php and paste it into /override/controllers/front/ContactController.php. Checking and testing new fields. In the ContactController.php file, the postProcess function checks that the fields are correctly filled in before sending the form content. If the fields are required (as in the example), we need to add the conditions. Still in the postProcess function, you must modify the if (!count($this--errors)) condition. If you make a mistake, please fill in the fields. If the mandatory fields are not filled during form validation, the fields must keep the values entered previously. We will modify the ContactController.php file again in the initContent() function.
Prestashop Agency, , Prestashop Infinite Scroll, , CM CIC Prestashop, , Change Prestashop domain, , OVH Prestashop

Web2007 accepts the following payment methods:

  • Visa

  • MasterCard

  • PayPal

  • IBAN

  • Twint

Editing Prestashop contact form template.

Prestashop screens are managed using "templates" (or "models"), which are grouped in a theme. This template is an empty template that provides the structure of the page and will be filled with information. Our contact form, for example, has a drop-down menu that will be populated with store contacts. This "template" will need to be modified in order to add the new section. Let's say the default theme is "classic", which will simplify things. However, the process will remain the same regardless of the theme used. We will start by creating a "child theme". This is a different theme from the main theme. It is possible to remove the child theme entirely and make changes in the main theme.
Smartsupp Prestashop, , SAP Business One Prestashop, , Sagepay Prestashop, , Prestashop 301 redirect, , Prestashop strikethrough price

Other benefits at WEB2007:

Best report
price quality

Fast intervention !
(subject to availability)

Available evenings and weekends
(except holidays and vacations)

Edit PrestaShop Contact Form Emails 1.6.

PrestaShop emails exist in two formats: HTML and txt. Both formats need to be modified, so we modify /mails/en/contact.html and /mails/en/contact.txt. To apply the changes to your contact form, you will need to take a few steps: delete the /cache/class_index.php file. PrestaShop back office: advanced preferences - force compilation . PrestaShop back office - advanced preferences - disable cache . PrestaShop back office - advanced preferences - enable overrides.
Prestashop phone required, , Prestashop preorder, , Prestashop popup, , Prestashop sponsorship, , Prestashop partial delivery

Listen in Audio to the text of this page:

Taking into account the modification of the Prestashop contact form.

It is not enough to add a new field to the "template", but Prestashop must also take it into account. The "contactform" module manages the contact form. The "contactform" module should not be overloaded as a child theme. This is to ensure that any updates do not overwrite the changes made. Let's start by creating the following file (and directory tree): "/override/modules/contactform/contactform.php". Open the original file "/modules/contactform/contactform.php" and copy the two functions (or methods since it is a PHP class) getWidgetVariables and sendMessage.
Prestashop Lengow, , Prestashop spam registration, , Prestashop Google Search Console, , Prestashop admin login not possible, , Prestashop Colissimo

What is a contact form ?

Contact forms are the primary form of communication between visitors to the Company's website and its users. This is often the last step before a potential prospect becomes a customer. It is an advantage for visitors to be able to request information in one click without having to open their mail. A contact form adapted to the needs of the company will allow it to receive quality and targeted information. It avoids spam and does not display email addresses to the public. The form is more important than any other content in terms of organization and usability. To ensure the best conversion rate, we recommend a few best practices. Before you can create your form, it is important to ask yourself the right questions.
Prestashop gift voucher, , Prestashop Banque Populaire, , PayPal Prestashop, , Pagespeed Prestashop, , Odoo Prestashop integration

What is PrestaShop ?

Are you interested in launching an e-commerce site? You may have heard of PrestaShop. PrestaShop is easy to learn. PrestaShop, developed in France, allows you to create online stores using an open-source solution. PrestaShop is an e-commerce CMS (Content Management System). It allows you to manage the content of your e-commerce site. As you already know, this solution will allow you to easily manage your store.
Migrate Shopify to Prestashop, , Prestashop server migration, , Migrating Magento to Prestashop, , Update Prestashop, , Marketing Automation Prestashop

How to fix a bug or problem on a Prestashop contact form module ?

If you have purchased a contact form module for Prestashop and you encounter a technical problem, Web2007 can assist and troubleshoot. You should know that in almost all cases, the module works perfectly, the server or php error comes from a conflict with your theme or one of your other installed modules. A troubleshooting expert will first detect errors with Prestashop's debug mode. Here are the tips: To determine if the bug is due to your template, activate the default Prestashop template and then refresh the page. If the bug persists, it means that your model is not at fault. To determine if the bug is caused by one of your modules, disable each module and refresh the page that caused the problem. If the bug appears suddenly, you can start with the modules that were installed most recently. If the bug goes away when you disable a module, that means that module is responsible.
Instagram Prestashop, , Imagify Prestashop, , DHL Express Prestashop, , Credit Agricole Prestashop, , Prestashop maintenance contract

No products available yet

Stay tuned! More products will be shown here as they are added.