2014-12-04 68 views

回答

4

您可以編輯PrestaShop back-officeCustomersContacts中的聯繫人。

要禁用Subject下拉在contact-form.tpl替換此:

<div class="form-group selector1"> 
    <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" class="form-control" id="contact_name" name="contact_name" value="{$contact.name|escape:'html':'UTF-8'}" readonly="readonly" /> 
        <input type="hidden" name="id_contact" value="{$contact.id_contact}" /> 
       {/if} 
      {/foreach} 
</div> 
    {else} 
     <select id="id_contact" class="form-control" name="id_contact"> 
      <option value="0">{l s='-- Choose --'}</option> 
      {foreach from=$contacts item=contact} 
       <option value="{$contact.id_contact|intval}" {if isset($smarty.request.id_contact) && $smarty.request.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'html':'UTF-8'}</option> 
      {/foreach} 
     </select> 
</div> <!-- .col-xs-12 .col-md-3 --> 
    <p id="desc_contact0" class="desc_contact">&nbsp;</p> 
    {foreach from=$contacts item=contact} 
     <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact contact-title" style="display:none;"> 
      <i class="icon-comment-alt"></i>{$contact.description|escape:'html':'UTF-8'} 
     </p> 
    {/foreach} 
{/if} 

包含您的聯繫ID值的隱藏字段:

<input type="hidden" name="id_contact" value="YOUR_CONTACT_ID" /> 
+0

在Presta的1.6你還可以添加 < input type =「hidden」name =「contact_name」value =「3」/> – kmike 2015-05-21 20:44:57