MathiasReker Posted September 14, 2013 Share Posted September 14, 2013 (edited) Hi, I have tried to remove the subject from my contact page, but I can't make it working.. I would also like to remove some other fields. Please look at the image. The forms with the red border is forms that I want to remove. The last box (msg box) is not in line with the other boxes. Can anyone help me to solve this? I am using prestashop v. 1.5.4.1 Thank you! Best regards, Edited September 20, 2013 by vekia (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 15, 2013 Share Posted September 15, 2013 well, in back office under customers > contacts tab: 1) define only one email address all other fields you can disable with css styles (display:none) or in theme template file 1 Link to comment Share on other sites More sharing options...
vekia Posted September 15, 2013 Share Posted September 15, 2013 + in customer > customer service switch option "allow file uploading" to no 1 Link to comment Share on other sites More sharing options...
MathiasReker Posted September 15, 2013 Author Share Posted September 15, 2013 Thank you. But still with one e-mail only, I have to select it from the dropdown list. Link to comment Share on other sites More sharing options...
vekia Posted September 15, 2013 Share Posted September 15, 2013 create hidden value <input type="hidden" name="id_contact" value="1"/> and remove current select id="id_contact" then it will work as you expect 1 Link to comment Share on other sites More sharing options...
MathiasReker Posted September 20, 2013 Author Share Posted September 20, 2013 Im sorry, but I can't get it work. Would you please edit the file for me? {* * 2007-2012 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {capture name=path}{l s='Contact'}{/capture} <h1>{l s='Customer service'} - {if isset($customerThread) && $customerThread}{l s='Your reply'}{else}{l s='Contact us'}{/if}</h1> {if isset($confirmation)} <p>{l s='Your message has been successfully sent to our team.'}</p> <ul class="footer_links"> <li><a href="{$base_dir}"><img class="icon" alt="" src="{$img_dir}icon/home.gif"/></a><a href="{$base_dir}">{l s='Home'}</a></li> </ul> {elseif isset($alreadySent)} <p>{l s='Your message has already been sent.'}</p> <ul class="footer_links"> <li><a href="{$base_dir}"><img class="icon" alt="" src="{$img_dir}icon/home.gif"/></a><a href="{$base_dir}">{l s='Home'}</a></li> </ul> {else} <p class="bold">{l s='For questions about an order or for more information about our products'}.</p> {include file="$tpl_dir./errors.tpl"} <form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std" enctype="multipart/form-data"> <fieldset> <h3>{l s='Send a message'}</h3> <div class="content_form"> <p class="select"> <label for="id_contact">{l s='Subject Heading'}</label> {if isset($customerThread.id_contact)} {foreach from=$contacts item=contact} {if $contact.id_contact == $customerThread.id_contact} <input type="text" id="contact_name" name="contact_name" value="{$contact.name|escape:'htmlall':'UTF-8'}" readonly="readonly" /> <input type="hidden" name="id_contact" value="{$contact.id_contact}" /> {/if} {/foreach} </p> {else} <select id="id_contact" name="id_contact" onchange="showElemFromSelect('id_contact', 'desc_contact')"> <option value="0">{l s='-- Choose --'}</option> {foreach from=$contacts item=contact} <option value="{$contact.id_contact|intval}" {if isset($smarty.post.id_contact) && $smarty.post.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> <p id="desc_contact0" class="desc_contact"> </p> {foreach from=$contacts item=contact} <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;"> {$contact.description|escape:'htmlall':'UTF-8'} </p> {/foreach} {/if} <p class="text"> <label for="email">{l s='Email address'}</label> {if isset($customerThread.email)} <input type="text" id="email" name="from" value="{$customerThread.email|escape:'htmlall':'UTF-8'}" readonly="readonly" /> {else} <input type="text" id="email" name="from" value="{$email|escape:'htmlall':'UTF-8'}" /> {/if} </p> {if !$PS_CATALOG_MODE} {if (!isset($customerThread.id_order) || $customerThread.id_order > 0)} <p class="text select"> <label for="id_order">{l s='Order reference'}</label> {if !isset($customerThread.id_order) && isset($isLogged) && $isLogged == 1} <select name="id_order" > <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:'htmlall':'UTF-8'}</option> {/foreach} </select> {elseif !isset($customerThread.id_order) && !isset($isLogged)} <input type="text" name="id_order" id="id_order" value="{if isset($customerThread.id_order) && $customerThread.id_order > 0}{$customerThread.id_order|intval}{else}{if isset($smarty.post.id_order)}{$smarty.post.id_order|intval}{/if}{/if}" /> {elseif $customerThread.id_order > 0} <input type="text" name="id_order" id="id_order" value="{$customerThread.id_order|intval}" readonly="readonly" /> {/if} </p> {/if} {if isset($isLogged) && $isLogged} <p class="text select"> <label for="id_product">{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="product_select" style="{if !$smarty.foreach.products.first} 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:'htmlall':'UTF-8'}</option> {/foreach} </select> {/foreach} {elseif $customerThread.id_product > 0} <input type="text" name="id_product" id="id_product" value="{$customerThread.id_product|intval}" readonly="readonly" /> {/if} </p> {/if} {/if} {if $fileupload == 1} <p class="text"> <label for="fileUpload">{l s='Attach File'}</label> <input type="hidden" name="MAX_FILE_SIZE" value="2000000" /> <input type="file" name="fileUpload" id="fileUpload" /> </p> {/if} <p class="textarea"> <label for="message">{l s='Message'}</label> <textarea id="message" name="message" rows="15" cols="10">{if isset($message)}{$message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea> </p> <p class="submit"> <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" onclick="$(this).hide();" /> </p> </div> </fieldset> </form> {/if} Link to comment Share on other sites More sharing options...
vekia Posted September 20, 2013 Share Posted September 20, 2013 what is the ID number of contact that you want to use under customers > contacts ? 1 Link to comment Share on other sites More sharing options...
MathiasReker Posted September 20, 2013 Author Share Posted September 20, 2013 2 Link to comment Share on other sites More sharing options...
vekia Posted September 20, 2013 Share Posted September 20, 2013 so, instead of: <p class="select"> <label for="id_contact">{l s='Subject Heading'}</label> {if isset($customerThread.id_contact)} {foreach from=$contacts item=contact} {if $contact.id_contact == $customerThread.id_contact} <input type="text" id="contact_name" name="contact_name" value="{$contact.name|escape:'htmlall':'UTF-8'}" readonly="readonly" /> <input type="hidden" name="id_contact" value="{$contact.id_contact}" /> {/if} {/foreach} </p> use this: <input type="hidden" name="id_contact" value="2" /> 2 Link to comment Share on other sites More sharing options...
MathiasReker Posted September 20, 2013 Author Share Posted September 20, 2013 When I do that, upload the file and push the "F5" button, I get a blank screen. Any kind of 500 error I think.. Link to comment Share on other sites More sharing options...
vekia Posted September 20, 2013 Share Posted September 20, 2013 my bad, im sorry i suggested to remove code: <p class="select"> <label for="id_contact">{l s='Subject Heading'}</label> {if isset($customerThread.id_contact)} {foreach from=$contacts item=contact} {if $contact.id_contact == $customerThread.id_contact} <input type="text" id="contact_name" name="contact_name" value="{$contact.name|escape:'htmlall':'UTF-8'}" readonly="readonly" /> <input type="hidden" name="id_contact" value="{$contact.id_contact}" /> {/if} {/foreach} </p> i analysed the code once again, it was wrong suggestion there is code: <p class="select"> <label for="id_contact">{l s='Subject Heading'}</label> {if isset($customerThread.id_contact)} {foreach from=$contacts item=contact} {if $contact.id_contact == $customerThread.id_contact} <input type="text" id="contact_name" name="contact_name" value="{$contact.name|escape:'htmlall':'UTF-8'}" readonly="readonly" /> <input type="hidden" name="id_contact" value="{$contact.id_contact}" /> {/if} {/foreach} </p> {else} <select id="id_contact" name="id_contact" onchange="showElemFromSelect('id_contact', 'desc_contact')"> <option value="0">{l s='-- Choose --'}</option> {foreach from=$contacts item=contact} <option value="{$contact.id_contact|intval}" {if isset($smarty.post.id_contact) && $smarty.post.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> <p id="desc_contact0" class="desc_contact"> </p> {foreach from=$contacts item=contact} <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;"> {$contact.description|escape:'htmlall':'UTF-8'} </p> {/foreach} {/if} instead of this whole code use: <input type="hidden" name="id_contact" value="2" /> now it will work, i promise 1 Link to comment Share on other sites More sharing options...
MathiasReker Posted September 20, 2013 Author Share Posted September 20, 2013 (edited) Thank you. But it removes the email too EDIT: My bad, it works! Thank you alot! Edited September 20, 2013 by shinetech.dk (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 20, 2013 Share Posted September 20, 2013 you're welcome thanks for your patience im going to mark this topic as [solved] best regards 1 Link to comment Share on other sites More sharing options...
Recommended Posts