Jump to content

Remove order id from contact form


Recommended Posts

As PSfever said, simply get rid of this

<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) && empty($isLogged)}
					<input 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|intval}{/if}{/if}" />
				{elseif $customerThread.id_order|intval > 0}
					<input type="text" name="id_order" id="id_order" value="{$customerThread.id_order|intval}" readonly="readonly" />
				{/if}
			</p>

In contact-form.tpl

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 2 years later...

Did you try what I suggested above? It shouldn't be much different in terms of code, it's still with the same name attribute

Hi, I am trying unsuccessfully to remove the OrderIDs column from ORDERS page in BO. Any change you help me out on PS 1.5.6.0. Thanks 

Link to comment
Share on other sites

Hi,

If you want to remove the ID field from the orders listing page in BO , then go to file: /controllers/admin/AdminOrdersController.php

 

Find the following lines:

"

$this->fields_list = array(
'id_order' => array(
'title' => $this->l('ID'),
'align' => 'center',
'width' => 25
),
'reference' => array(
"
and remove the ID_order from the array, so it will look like: 
"
$this->fields_list = array(
'reference' => array(
"
 
Regards, Leo
Link to comment
Share on other sites

Hi

for hiding the column you could try to add a hidden class to ID field, but in presta 1.5  is not yet defined. For a workaround you could add the class "input-error"(this class already has display:none in ps1.5) to the align property of ID (highlighted in red) like this:

 

$this->fields_list = array(
'id_order' => array(
'title' => $this->l('ID'),
'align' => 'center input-error',
'width' => 25
)
 
Regards, Leo
Link to comment
Share on other sites

×
×
  • Create New...