wojwen Posted January 5, 2017 Share Posted January 5, 2017 In the default contact us form there are certain fileds like order number or add file option that I don't need at all and I would like t remove them. The problem is that I can't find any module that is resposinble for that. Do I have to edit tpl file or have I missed something? Link to comment Share on other sites More sharing options...
Tupelius Posted January 8, 2017 Share Posted January 8, 2017 Hi! Maybe this helps removing that add file option: You can find "Allow file uploading" from Customer --> customer service Fields remove I would also like to no how it is done. I want to get one field removed but I haven't find any solution. 1 Link to comment Share on other sites More sharing options...
shokinro Posted January 8, 2017 Share Posted January 8, 2017 The implementation is different for PrestaShop 1.6x or lower and PrestaShop 1.7x For PrestaShop 1.6x or lower, you can find following files for this page /controllers/front/ContactController.php /themes/default-bootstrap/contact-form.tpl For PrestaShop 1.7x it is implemented in following module /modules/ps_contactinfo/ps_contactinfo.php /modules/ps_contactinfo/ps_contactinfo.tpl /modules/ps_contactinfo/ps_contactinfo-rich.tpl To remove the field, you will need to remove related files in themes files (.tpl). But you may also need to modify related controller file or module file if it is required fields. 1 Link to comment Share on other sites More sharing options...
Tupelius Posted January 9, 2017 Share Posted January 9, 2017 (edited) Hi! I have 1.6x. Does anyone have more detailed discription how to do that? I can find and change coding inside those files but what should I change is out of my knowledge Edited January 9, 2017 by Tupelius (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted January 9, 2017 Share Posted January 9, 2017 if you want to get detailed instructions, you better give detailed request first. I am not sure which field you wanted to be removed. If you want to remove file upload field, you can try to remove following lines {if $fileupload == 1} <p class="form-group"> <label for="fileUpload">{l s='Attach File'}</label> <input type="hidden" name="MAX_FILE_SIZE" value="{if isset($max_upload_size) && $max_upload_size}{$max_upload_size|intval}{else}2000000{/if}" /> <input type="file" name="fileUpload" id="fileUpload" class="form-control" /> </p> {/if} Link to comment Share on other sites More sharing options...
Tupelius Posted January 9, 2017 Share Posted January 9, 2017 Sorry. Maybe this is more detailed. I am tyring to remove Order reference field: What file I should edit? I remove from the contact-form.tpl the next lines to test if the attach file disappears but it didn't help: {if $fileupload == 1} <p class="form-group"> <label for="fileUpload">{l s='Attach File'}</label> <input type="hidden" name="MAX_FILE_SIZE" value="{if isset($max_upload_size) && $max_upload_size}{$max_upload_size|intval}{else}2000000{/if}" /> <input type="file" name="fileUpload" id="fileUpload" class="form-control" /> </p> {/if} After that I erase a lot more just to test if the order refererence field disappears or something else would. In catalog mode oreder reference field is not visible and probably this part from contact-form.tpl has something to do whit that? Probably I am in a wrong file? But anyway I removed this part and nothing disappeared: </p> {if !$PS_CATALOG_MODE} {if (!isset($customerThread.id_order) || $customerThread.id_order > 0)} <div class="form-group selector1"> <label>{l s='Order reference'}</label> {if !isset($customerThread.id_order) && isset($is_logged) && $is_logged} <select name="id_order" class="form-control"> <option value="0">{l s='-- Choose --'}</option> {foreach from=$orderList item=order} <option value="{$order.value|intval}"{if $order.selected|intval} selected="selected"{/if}>{$order.label|escape:'html':'UTF-8'}</option> {/foreach} </select> {elseif !isset($customerThread.id_order) && empty($is_logged)} <input class="form-control grey" type="text" name="id_order" id="id_order" value="{if isset($customerThread.id_order) && $customerThread.id_order|intval > 0}{$customerThread.id_order|intval}{else}{if isset($smarty.post.id_order) && !empty($smarty.post.id_order)}{$smarty.post.id_order|escape:'html':'UTF-8'}{/if}{/if}" /> {elseif $customerThread.id_order|intval > 0} <input class="form-control grey" type="text" name="id_order" id="id_order" value="{if isset($customerThread.reference) && $customerThread.reference}{$customerThread.reference|escape:'html':'UTF-8'}{else}{$customerThread.id_order|intval}{/if}" readonly="readonly" /> {/if} </div> {/if} {if isset($is_logged) && $is_logged} <div class="form-group selector1"> <label class="unvisible">{l s='Product'}</label> {if !isset($customerThread.id_product)} {foreach from=$orderedProductList key=id_order item=products name=products} <select name="id_product" id="{$id_order}_order_products" class="unvisible product_select form-control"{if !$smarty.foreach.products.first} style="display:none;"{/if}{if !$smarty.foreach.products.first} disabled="disabled"{/if}> <option value="0">{l s='-- Choose --'}</option> {foreach from=$products item=product} <option value="{$product.value|intval}">{$product.label|escape:'html':'UTF-8'}</option> {/foreach} </select> {/foreach} {elseif $customerThread.id_product > 0} <input type="hidden" name="id_product" id="id_product" value="{$customerThread.id_product|intval}" readonly="readonly" /> {/if} </div> {/if} {/if} {if $fileupload == 1} <p class="form-group"> <label for="fileUpload">{l s='Attach File'}</label> <input type="hidden" name="MAX_FILE_SIZE" value="{if isset($max_upload_size) && $max_upload_size}{$max_upload_size|intval}{else}2000000{/if}" /> <input type="file" name="fileUpload" id="fileUpload" class="form-control" /> </p> {/if} Link to comment Share on other sites More sharing options...
rictools Posted January 10, 2017 Share Posted January 10, 2017 Did you clear prestashop and browser caches? Link to comment Share on other sites More sharing options...
shokinro Posted January 10, 2017 Share Posted January 10, 2017 make sure your smarty cache configuration is set correctly - back office - Advanced Parameters - Performances Link to comment Share on other sites More sharing options...
nad Posted March 7, 2018 Share Posted March 7, 2018 Hi, i am newbie here. i'm having a similar problem as i want to remove the attach file section however, after i did some alteration in the source code and delete the attach file's line, the attach file section still appeared in my contact form. how do i do that?. please somebody help me Thank you Link to comment Share on other sites More sharing options...
Maneesh Posted February 20, 2020 Share Posted February 20, 2020 (edited) Hi Every One, I think that is more help full. (PS 1.7) That is only for hide attachment. I admin Customer Service->Customer Service->CONTACT OPTIONS Here is option Allow file uploading Yes or No and Save Done👍 Best Regards Maneesh Tiwari Edited February 20, 2020 by Maneesh (see edit history) 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