- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
PrestaShop 1.6.x. How to remove contact form fields (i.e. Order Reference)
August 18, 2016
This tutorial provides an explanation on how to remove contact form fields in PrestaShop 1.6.x.
In order to remove contact form fields, you need to perform the following steps:
-
Log into your Control Hosting Panel (cPanel) on a server.
-
Locate the File Manager and go to your website folder (you can perform the next steps via your FTP as well).
-
Navigate to the themes/themeXXX/ directory, and open the contact-form.tpl file (or download it in order to edit it on your computer).
-
For instance, let’s remove the Order reference field.
Use the search function in your code editor (
Ctrl+F
keys on your keyboard), and type order reference text as a search parameter.You will find the order reference occurrence in this piece of code (on the line 80 approximately):
This code is wrapped with the {if}{/if} statement. You need to remove the entire {if}{/if} statement (lines 78-94 approximately):
{if (!isset($customerThread.id_order) || $customerThread.id_order > 0)}
{if !isset($customerThread.id_order) && isset($is_logged) && $is_logged} {elseif !isset($customerThread.id_order) && empty($is_logged)} {elseif $customerThread.id_order|intval > 0} {/if}{/if} -
Save your changes, re-upload the file back to your server, and refresh your website. The Order reference field has been removed from the contact form.
-
You can remove the rest of the fields that you do not need in the same way. For example, let’s review how to remove the Attach File field.
Use your code editor search function, and type attach file text as a search parameter.
You will find the attach file occurrence in this piece of code (on the line 98 approximately):
This code is wrapped with the {if}{/if} statement as well. You need to remove the entire {if}{/if} statement (lines 96-102 approximately):
{if $fileupload == 1}
-
Save your changes, re-upload the file back to your server, and refresh your website. The Attach File field has been removed from the contact form too.
Now you know how to remove contact form fields in PrestaShop 1.6.x.
Feel free to check the detailed video tutorial below:
PrestaShop 1.6.x. How to remove contact form fields (i.e. Order Reference)We also have a collection of other Prestashop themes that may get you interested.