Jump to content

[solved] Admin order - Move "Messages" field up above "Customer information"


Recommended Posts

When I handle orders I sometimes forget to scroll down to the bottom of the order page to see of there are any messages from customers.

 

I would very much like to move the "Messages" up above the "Customer information" as illustrated at the screenshot (q1.jpg).

 

I believe it should be pretty easy (moving some lines of code upwards). I just cannot find the right file to edit.

 

Any help much appreciated! It is really troublesome to remember to always scroll to the bottom to see if there are any messages.

 

I use ps 1.5.2.0.

post-30631-0-59707600-1359911446_thumb.jpg

Edited by vekia (see edit history)
Link to comment
Share on other sites

hi

 

so, you must go to the: ADMIN_DIR/themes/default/template/controllers/orders/helpers/view/view.tpl

 

and move code:

 

<div style="float: left">
 <form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');">
 <fieldset style="width: 400px;">
  <legend style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</legend>
  <div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;">
<a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer'}</a>
  </div>
  <a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages'}</a><br>
  <div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">
  <select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">
   <option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>
  {foreach from=$orderMessages item=orderMessage}
<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>
  {/foreach}
  </select><br /><br />
  <b>{l s='Display to customer?'}</b>
  <input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'}
  <input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'}
  <p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p><br /><br />
<textarea id="txt_msg" name="message" cols="50" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 chars max'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br />
<input type="hidden" name="id_order" value="{$order->id}" />
<input type="hidden" name="id_customer" value="{$order->id_customer}" />
<input type="submit" class="button" name="submitMessage" value="{l s='Send'}" />
  </div>
 </fieldset>
 </form>
{if (sizeof($messages))}
 <br />
 <fieldset style="width: 400px;">
 <legend><img src="../img/admin/email.gif" /> {l s='Messages'}</legend>
 {foreach from=$messages item=message}
  <div style="overflow:auto; width:400px;" {if $message['is_new_for_me']}class="new_message"{/if}>
  {if ($message['is_new_for_me'])}
<a class="new_message" title="{l s='Mark this message as \'viewed\''}" href="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}&messageReaded={$message['id_message']}"><img src="../img/admin/enabled.gif" alt="" /></a>
  {/if}
  {l s='At'} <i>{dateFormat date=$message['date_add']}
  </i> {l s='from'} <b>{if ($message['elastname'])}{$message['efirstname']} {$message['elastname']}{else}{$message['cfirstname']} {$message['clastname']}{/if}</b>
  {if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private:'}</span>{/if}
  <p>{$message['message']|nl2br}</p>
  </div>
  <br />
 {/foreach}
 </fieldset>
{/if}
</div>

 

somewhere above other blocks ;)

  • Like 2
Link to comment
Share on other sites

hi

 

so, you must go to the: ADMIN_DIR/themes/default/template/controllers/orders/helpers/view/view.tpl

 

and move code:

...

somewhere above other blocks ;)

 

Thank you so much for your fast reply! This was excactly what I was looking for.

Link to comment
Share on other sites

(12,Mar,2013, SOLVED , with custom module)

 

Hello Vekia

maybe you can suggest code for adding "products" tab in orders at Back office?

I would like to search for products at order list.

( I was using for 1.4.X a module , not available at 1.5.X and i needed it desperately)

 

( Furthermore , If you can develope a module with similar functionality i will be happy to buy it)

post-136558-0-74300300-1360159243_thumb.jpg

Edited by siomosp (see edit history)
Link to comment
Share on other sites

  • 10 months later...
  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...