// orders cleanup

This commit is contained in:
Kevin Granger
2013-09-19 16:55:06 +02:00
parent a5642d43a3
commit 650001024a
@@ -65,102 +65,114 @@
<div class="bloc-command panel"> <div class="bloc-command panel">
<div class="button-command"> <div class="button-command">
{if (count($invoices_collection))} {if (count($invoices_collection))}
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank"> <a class="btn btn-default" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank">
<img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'} <img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}
</a> </a>
{else} {else}
<img src="../img/admin/charged_ko.gif" alt="{l s='No invoice'}" /> {l s='No invoice'} <img src="../img/admin/charged_ko.gif" alt="{l s='No invoice'}" /> {l s='No invoice'}
{/if} {/if}
|
{if (($currentState && $currentState->delivery) || $order->delivery_number)} {if (($currentState && $currentState->delivery) || $order->delivery_number)}
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank"> <a class="btn btn-default" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank">
<img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'} <img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" />
{l s='View delivery slip'}
</a> </a>
{else} {else}
<img src="../img/admin/delivery_ko.gif" alt="{l s='No delivery slip'}" /> {l s='No delivery slip'} <img src="../img/admin/delivery_ko.gif" alt="{l s='No delivery slip'}" />
{l s='No delivery slip'}
{/if} {/if}
| <a class="btn btn-default" href="javascript:window.print()">
<a class="button" href="javascript:window.print()"><img src="../img/admin/printer.gif" alt="{l s='Print order'}" title="{l s='Print order'}" /> {l s='Print order'}</a> <img src="../img/admin/printer.gif" alt="{l s='Print order'}" title="{l s='Print order'}" />
{l s='Print order'}
</a>
</div> </div>
<div class="metadata-command"> <div class="metadata-command">
<dl> <dl>
<dt>{l s='Date'} </dt> <dt>{l s='Date'} </dt>
<dd>{dateFormat date=$order->date_add full=true}</dd> <dd>{dateFormat date=$order->date_add full=true}</dd>
|</dl> </dl>
<dl> <dl>
<dt>{l s='Messages:'}</dt> <dt>{l s='Messages:'}</dt>
<dd>{sizeof($messages)}</dd> <dd>{sizeof($messages)}</dd>
|</dl> </dl>
<dl> <dl>
<dt><a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{l s='New Customer Messages:'}</a></dt> <dt>
<dd><a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{sizeof($customer_thread_message)}</a></dd> <a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{l s='New Customer Messages:'}</a>
|</dl> </dt>
<dd>
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{sizeof($customer_thread_message)}</a>
</dd>
</dl>
<dl> <dl>
<dt>{l s='Products:'}</dt> <dt>{l s='Products:'}</dt>
<dd id="product_number">{sizeof($products)}</dd> <dd id="product_number">{sizeof($products)}</dd>
|</dl> </dl>
<dl> <dl>
<dt>{l s='Total'}</dt> <dt>{l s='Total'}</dt>
<dd class="total_paid">{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</dd> <dd class="total_paid">{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</dd>
</dl> </dl>
</div> </div>
</div> </div>
<div class="container-command"> <div class="container-command">
<!-- Left column --> <!-- Left column -->
<div> <div>
<!-- Change status form --> <!-- Change status form -->
<form action="{$currentIndex}&vieworder&token={$smarty.get.token}" method="post"> <form class="panel" action="{$currentIndex}&vieworder&token={$smarty.get.token}" method="post">
<select id="id_order_state" name="id_order_state"> <select id="id_order_state" name="id_order_state">
{foreach from=$states item=state} {foreach from=$states item=state}
<option value="{$state['id_order_state']}"{if $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|stripslashes}</option> <option value="{$state['id_order_state']}"{if $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|stripslashes}</option>
{/foreach} {/foreach}
</select> </select>
<input type="hidden" name="id_order" value="{$order->id}" /> <input type="hidden" name="id_order" value="{$order->id}" />
<input type="submit" name="submitState" value="{l s='Add'}" class="button" /> <input type="submit" name="submitState" value="{l s='Add'}" class="btn btn-default" />
</form> </form>
<!-- History of status --> <!-- History of status -->
<table class="table history-status"> <div class="panel">
<colgroup> <table class="table history-status">
<col width="1%"> <tbody>
<col width=""> {foreach from=$history item=row key=key}
<col width="20%"> {if ($key == 0)}
<col width="20%"> <tr class="highlighted">
</colgroup> <td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
{foreach from=$history item=row key=key} <td><span class="title_box ">{$row['ostate_name']|stripslashes}</span></td>
{if ($key == 0)} <td><span class="title_box ">{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}</span></td>
<tr> <td><span class="title_box ">{dateFormat date=$row['date_add'] full=true}</span></td>
<th><img src="../img/os/{$row['id_order_state']}.gif" /></th> </tr>
<th>{$row['ostate_name']|stripslashes}</th> {else}
<th>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}</th> <tr>
<th>{dateFormat date=$row['date_add'] full=true}</th> <td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
</tr> <td>{$row['ostate_name']|stripslashes}</td>
{else} <td>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else}&nbsp;{/if}</td>
<tr class="{if ($key % 2)}alt_row{/if}"> <td>{dateFormat date=$row['date_add'] full=true}</td>
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td> </tr>
<td>{$row['ostate_name']|stripslashes}</td> {/if}
<td>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else}&nbsp;{/if}</td> {/foreach}
<td>{dateFormat date=$row['date_add'] full=true}</td> </tbody>
</tr> </table>
{/if} </div>
{/foreach}
</table>
{if $customer->id} {if $customer->id}
<!-- Customer informations --> <!-- Customer informations -->
<fieldset> <fieldset>
<h3><img src="../img/admin/tab-customers.gif" /> {l s='Customer information'}</h3> <h3>
<span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id}) <i class="icon-user"></i>
{l s='Customer information'}
</h3>
<span>
<a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a>
</span> ({l s='#'}{$customer->id})
(<a href="mailto:{$customer->email}">{$customer->email}</a>) (<a href="mailto:{$customer->email}">{$customer->email}</a>)
{if ($customer->isGuest())} {if ($customer->isGuest())}
{l s='This order has been placed by a guest.'} {l s='This order has been placed by a guest.'}
{if (!Customer::customerExists($customer->email))} {if (!Customer::customerExists($customer->email))}
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}"> <form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
<input type="hidden" name="id_lang" value="{$order->id_lang}" /> <input type="hidden" name="id_lang" value="{$order->id_lang}" />
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p> <p class="center"><input class="btn btn-default" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p>
{l s='This feature will generate a random password and send an email to the customer.'} {l s='This feature will generate a random password and send an email to the customer.'}
</form> </form>
{else} {else}
<div><b style="color:red;">{l s='A registered customer account has already claimed this email address'}</b></div> <div>
<b style="color:red;">{l s='A registered customer account has already claimed this email address'}</b>
</div>
{/if} {/if}
{else} {else}
{l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br /> {l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br />
@@ -173,7 +185,10 @@
<!-- Sources block --> <!-- Sources block -->
{if (sizeof($sources))} {if (sizeof($sources))}
<fieldset> <fieldset>
<h3><img src="../img/admin/tab-stats.gif" /> {l s='Sources'}</h3> <h3>
<img src="../img/admin/tab-stats.gif" />
{l s='Sources'}
</h3>
<ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}> <ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}>
{foreach from=$sources item=source} {foreach from=$sources item=source}
<li> <li>
@@ -194,31 +209,32 @@
<!-- Right column --> <!-- Right column -->
<div> <div>
<div class="button-command-prev-next"> <div class="button-command-prev-next panel">
<b>{l s='Orders'}</b> : <b>{l s='Orders'}</b> :
{if $previousOrder}<a class="button" href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$previousOrder}">{l s='< Prev'}</a>{/if} {if $previousOrder}<a class="btn btn-default" href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$previousOrder}">{l s='< Prev'}</a>{/if}
{if $nextOrder}<a class="button" href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$nextOrder}">{l s='Next >'}</a>{/if} {if $nextOrder}<a class="btn btn-default" href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$nextOrder}">{l s='Next >'}</a>{/if}
</div> </div>
<div class="clear"></div>
<!-- linked orders block --> <!-- linked orders block -->
{if count($order->getBrother()) > 0} {if count($order->getBrother()) > 0}
<fieldset> <fieldset>
<h3><img src="../img/admin/tab-orders.gif" /> {l s='Linked orders'}</h3> <h3>
<img src="../img/admin/tab-orders.gif" />
{l s='Linked orders'}
</h3>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th width="10%"> <th>
{l s='Order no. '} {l s='Order no. '}
</th> </th>
<th> <th>
{l s='Status'} {l s='Status'}
</th> </th>
<th width="10%"> <th>
{l s='Amount'} {l s='Amount'}
</th> </th>
<th width="5%"> <th></th>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -245,7 +261,10 @@
<!-- Documents block --> <!-- Documents block -->
<fieldset> <fieldset>
<h3><img src="../img/admin/details.gif" /> {l s='Documents'}</h3> <h3>
<i class="icon-file"></i>
{l s='Documents'}
</h3>
{* Include document template *} {* Include document template *}
{include file='controllers/orders/_documents.tpl'} {include file='controllers/orders/_documents.tpl'}
@@ -253,8 +272,10 @@
<!-- Payments block --> <!-- Payments block -->
<fieldset> <fieldset>
<h3><img src="../img/admin/money.gif" /> {l s='Payment: '}</h3> <h3>
<i class="icon-money"></i>
{l s='Payment: '}
</h3>
{if (!$order->valid && sizeof($currencies) > 1)} {if (!$order->valid && sizeof($currencies) > 1)}
<form method="post" action="{$currentIndex}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"> <form method="post" action="{$currentIndex}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<p class="warn">{l s='Do not forget to update your exchange rate before making this change.'}</p> <p class="warn">{l s='Do not forget to update your exchange rate before making this change.'}</p>
@@ -266,11 +287,10 @@
{/if} {/if}
{/foreach} {/foreach}
</select> </select>
<input type="submit" class="button" name="submitChangeCurrency" value="{l s='Change'}" /> <input type="submit" class="btn btn-default" name="submitChangeCurrency" value="{l s='Change'}" />
</form> </form>
<hr class="clear"/>
{/if} {/if}
{if count($order->getOrderPayments()) > 0} {if count($order->getOrderPayments()) > 0}
<p class="error" style="{if round($orders_total_paid_tax_incl, 2) == round($total_paid, 2) || $currentState->id == 6}display: none;{/if}"> <p class="error" style="{if round($orders_total_paid_tax_incl, 2) == round($total_paid, 2) || $currentState->id == 6}display: none;{/if}">
{l s='Warning'} {displayPrice price=$total_paid currency=$currency->id} {l s='Warning'} {displayPrice price=$total_paid currency=$currency->id}
@@ -290,23 +310,15 @@
{/if} {/if}
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"> <form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<table class="table" width="100%" cellspacing="0" cellpadding="0"> <table class="table">
<colgroup>
<col width="15%">
<col width="">
<col width="20%">
<col width="10%">
<col width="10%">
<col width="1%">
</colgroup>
<thead> <thead>
<tr> <tr>
<th>{l s='Date'}</th> <th><span class="title_box ">{l s='Date'}</span></th>
<th>{l s='Payment method'}</th> <th><span class="title_box ">{l s='Payment method'}</span></th>
<th>{l s='Transaction ID'}</th> <th><span class="title_box ">{l s='Transaction ID'}</span></th>
<th>{l s='Amount'}</th> <th><span class="title_box ">{l s='Amount'}</span></th>
<th>{l s='Invoice'}</th> <th><span class="title_box ">{l s='Invoice'}</span></th>
<th>&nbsp;</th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -323,7 +335,7 @@
{l s='No invoice'} {l s='No invoice'}
{/if} {/if}
</td> </td>
<td class="right"> <td>
<a href="#" class="open_payment_information"><img src="../img/admin/details.gif" title="{l s='See payment information'}" alt="{l s='See payment information'}" /></a> <a href="#" class="open_payment_information"><img src="../img/admin/details.gif" title="{l s='See payment information'}" alt="{l s='See payment information'}" /></a>
</td> </td>
</tr> </tr>
@@ -402,7 +414,7 @@
</select> </select>
</td> </td>
{/if} {/if}
<td><input class="button" type="submit" name="submitAddPayment" value="{l s='Add'}" /></td> <td><input class="btn btn-default" type="submit" name="submitAddPayment" value="{l s='Add'}" /></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -412,9 +424,11 @@
<!-- Shipping block --> <!-- Shipping block -->
{if !$order->isVirtual()} {if !$order->isVirtual()}
<fieldset> <fieldset>
<h3><img src="../img/admin/delivery.gif" /> {l s='Shipping'}</h3> <h3>
<i class="icon-truck"></i>
<div class="clear" style="float: left; margin-right: 10px;"> {l s='Shipping'}
</h3>
<div>
<span>{l s='Recycled packaging'}</span> <span>{l s='Recycled packaging'}</span>
{if $order->recyclable} {if $order->recyclable}
<img src="../img/admin/enabled.gif" /> <img src="../img/admin/enabled.gif" />
@@ -422,14 +436,14 @@
<img src="../img/admin/disabled.gif" /> <img src="../img/admin/disabled.gif" />
{/if} {/if}
</div> </div>
<div style="float: left;"> <div>
<span>{l s='Gift wrapping'}</span> <span>{l s='Gift wrapping'}</span>
{if $order->gift} {if $order->gift}
<img src="../img/admin/enabled.gif" /> <img src="../img/admin/enabled.gif" />
</div> </div>
<div style="clear: left; margin: 0px 42px 0px 42px; padding-top: 2px;"> <div>
{if $order->gift_message} {if $order->gift_message}
<div style="border: 1px dashed #999; padding: 5px; margin-top: 8px;"><b>{l s='Message'}</b><br />{$order->gift_message|nl2br}</div> <div><b>{l s='Message'}</b><br />{$order->gift_message|nl2br}</div>
{/if} {/if}
{else} {else}
<img src="../img/admin/disabled.gif" /> <img src="../img/admin/disabled.gif" />
@@ -445,16 +459,19 @@
<!-- Return block --> <!-- Return block -->
<fieldset> <fieldset>
<h3><img src="../img/admin/delivery.gif" /> {l s='Merchandise returns'}</h3> <h3>
<i class="icon-reply"></i>
{l s='Merchandise returns'}
</h3>
{if $order->getReturn()|count > 0} {if $order->getReturn()|count > 0}
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th style="width:30%">Date</th> <th><span class="title_box ">Date</span></th>
<th>Type</th> <th><span class="title_box ">Type</span></th>
<th style="width:20%">Carrier</th> <th><span class="title_box ">Carrier</span></th>
<th style="width:30%">Tracking number</th> <th><span class="title_box ">Tracking number</span></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -466,13 +483,17 @@
<td> <td>
<span id="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{elseif isset($line.tracking_number)}{$line.tracking_number}{/if}</span> <span id="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{elseif isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
{if $line.can_edit} {if $line.can_edit}
<form style="display: inline;" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|escape:'htmlall':'UTF-8'}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'htmlall':'UTF-8'}{else}0{/if}"> <form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|escape:'htmlall':'UTF-8'}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'htmlall':'UTF-8'}{else}0{/if}">
<span class="shipping_number_edit" style="display:none;"> <span class="shipping_number_edit" style="display:none;">
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" /> <input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
<input type="submit" class="button" name="submitShippingNumber" value="{l s='Update'}" /> <input type="submit" class="btn btn-default" name="submitShippingNumber" value="{l s='Update'}" />
</span> </span>
<a href="#" class="edit_shipping_number_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a> <a href="#" class="edit_shipping_number_link">
<a href="#" class="cancel_shipping_number_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a> <img src="../img/admin/edit.gif" alt="{l s='Edit'}" />
</a>
<a href="#" class="cancel_shipping_number_link" style="display: none;">
<img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" />
</a>
</form> </form>
{/if} {/if}
</td> </td>
@@ -491,33 +512,34 @@
{/if} {/if}
</div> </div>
<!-- END Right column --> <!-- END Right column -->
<div class="clear" style="margin-bottom: 10px;"></div>
</div> </div>
<div class="container-command container-command-top-spacing"> <div class="container-command container-command-top-spacing">
<!-- Addresses --> <!-- Addresses -->
{if !$order->isVirtual()} {if !$order->isVirtual()}
<div style="width: 49%; float:left;"> <div>
<!-- Shipping address --> <!-- Shipping address -->
<fieldset> <fieldset>
<h3><img src="../img/admin/delivery.gif" alt="{l s='Shipping address'}" />{l s='Shipping address'}</h3> <h3>
<i class="icon-map-marker"></i>
{l s='Shipping address'}
</h3>
{if $can_edit} {if $can_edit}
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}"> <form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}">
<div style="margin-bottom:5px;"> <div>
<p> <p>
<select name="id_address"> <select name="id_address">
{foreach from=$customer_addresses item=address} {foreach from=$customer_addresses item=address}
<option value="{$address['id_address']}"{if $address['id_address'] == $order->id_address_delivery} selected="selected"{/if}>{$address['alias']} - {$address['address1']} {$address['postcode']} {$address['city']}{if !empty($address['state'])} {$address['state']}{/if}, {$address['country']}</option> <option value="{$address['id_address']}"{if $address['id_address'] == $order->id_address_delivery} selected="selected"{/if}>{$address['alias']} - {$address['address1']} {$address['postcode']} {$address['city']}{if !empty($address['state'])} {$address['state']}{/if}, {$address['country']}</option>
{/foreach} {/foreach}
</select> </select>
<input class="button" type="submit" name="submitAddressShipping" value="{l s='Change'}" /> <input class="btn btn-default" type="submit" name="submitAddressShipping" value="{l s='Change'}" />
</p> </p>
</div> </div>
</form> </form>
{/if} {/if}
<div style="float: right"> <div>
<a href="?tab=AdminAddresses&id_address={$addresses.delivery->id}&addaddress&realedit=1&id_order={$order->id}{if ($addresses.delivery->id == $addresses.invoice->id)}&address_type=1{/if}&token={getAdminToken tab='AdminAddresses'}&back={$smarty.server.REQUEST_URI|urlencode}"><img src="../img/admin/edit.gif" /></a> <a href="?tab=AdminAddresses&id_address={$addresses.delivery->id}&addaddress&realedit=1&id_order={$order->id}{if ($addresses.delivery->id == $addresses.invoice->id)}&address_type=1{/if}&token={getAdminToken tab='AdminAddresses'}&back={$smarty.server.REQUEST_URI|urlencode}"><img src="../img/admin/edit.gif" /></a>
<a href="http://maps.google.com/maps?f=q&hl={$iso_code_lang}&geocode=&q={$addresses.delivery->address1} {$addresses.delivery->postcode} {$addresses.delivery->city} {if ($addresses.delivery->id_state)} {$addresses.deliveryState->name}{/if}" target="_blank"><img src="../img/admin/google.gif" alt="" class="middle" /></a> <a href="http://maps.google.com/maps?f=q&hl={$iso_code_lang}&geocode=&q={$addresses.delivery->address1} {$addresses.delivery->postcode} {$addresses.delivery->city} {if ($addresses.delivery->id_state)} {$addresses.deliveryState->name}{/if}" target="_blank"><img src="../img/admin/google.gif" alt="" class="middle" /></a>
</div> </div>
@@ -527,27 +549,30 @@
</fieldset> </fieldset>
</div> </div>
{/if} {/if}
<div style="width: 49%; float:right;"> <div>
<!-- Invoice address --> <!-- Invoice address -->
<fieldset> <fieldset>
<h3><img src="../img/admin/invoice.gif" alt="{l s='Invoice address'}" />{l s='Invoice address'}</h3> <h3>
<i class="icon-file-text"></i>
{l s='Invoice address'}
</h3>
{if $can_edit} {if $can_edit}
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}"> <form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}">
<div style="margin-bottom:5px;"> <div>
<p> <p>
<select name="id_address"> <select name="id_address">
{foreach from=$customer_addresses item=address} {foreach from=$customer_addresses item=address}
<option value="{$address['id_address']}"{if $address['id_address'] == $order->id_address_invoice} selected="selected"{/if}>{$address['alias']} - {$address['address1']} {$address['postcode']} {$address['city']}{if !empty($address['state'])} {$address['state']}{/if}, {$address['country']}</option> <option value="{$address['id_address']}"{if $address['id_address'] == $order->id_address_invoice} selected="selected"{/if}>{$address['alias']} - {$address['address1']} {$address['postcode']} {$address['city']}{if !empty($address['state'])} {$address['state']}{/if}, {$address['country']}</option>
{/foreach} {/foreach}
</select> </select>
<input class="button" type="submit" name="submitAddressInvoice" value="{l s='Change'}" /> <input class="btn btn-default" type="submit" name="submitAddressInvoice" value="{l s='Change'}" />
</p> </p>
</div> </div>
</form> </form>
{/if} {/if}
<div style="float: right"> <div>
<a href="?tab=AdminAddresses&id_address={$addresses.invoice->id}&addaddress&realedit=1&id_order={$order->id}{if ($addresses.delivery->id == $addresses.invoice->id)}&address_type=2{/if}&back={$smarty.server.REQUEST_URI|urlencode}&token={getAdminToken tab='AdminAddresses'}"><img src="../img/admin/edit.gif" /></a> <a href="?tab=AdminAddresses&id_address={$addresses.invoice->id}&addaddress&realedit=1&id_order={$order->id}{if ($addresses.delivery->id == $addresses.invoice->id)}&address_type=2{/if}&back={$smarty.server.REQUEST_URI|urlencode}&token={getAdminToken tab='AdminAddresses'}"><img src="../img/admin/edit.gif" /></a>
</div> </div>
@@ -555,58 +580,68 @@
{if $addresses.invoice->other}<hr />{$addresses.invoice->other}<br />{/if} {if $addresses.invoice->other}<hr />{$addresses.invoice->other}<br />{/if}
</fieldset> </fieldset>
</div> </div>
<div class="clear" style="margin-bottom: 10px;"></div>
</div> </div>
<form style="width: 98%" class="container-command-top-spacing" action="{$current_index}&vieworder&token={$smarty.get.token}&id_order={$order->id}" method="post" onsubmit="return orderDeleteProduct('{l s='This product cannot be returned.'}', '{l s='Quantity to cancel is greater than quantity available.'}');"> <form class="container-command-top-spacing" action="{$current_index}&vieworder&token={$smarty.get.token}&id_order={$order->id}" method="post" onsubmit="return orderDeleteProduct('{l s='This product cannot be returned.'}', '{l s='Quantity to cancel is greater than quantity available.'}');">
<input type="hidden" name="id_order" value="{$order->id}" /> <input type="hidden" name="id_order" value="{$order->id}" />
<fieldset style="width: 100%; "> <fieldset >
<div style="display: none"> <div style="display: none">
<input type="hidden" value="{$order->getWarehouseList()|implode}" id="warehouse_list" /> <input type="hidden" value="{$order->getWarehouseList()|implode}" id="warehouse_list" />
</div> </div>
<h3><img src="../img/admin/cart.gif" alt="{l s='Products:'}" />{l s='Products:'}</h3> <h3>
<div style="float:left;width: 100%;"> <i class="icon-shopping-cart"></i>
{l s='Products:'}
</h3>
<div >
{if $can_edit} {if $can_edit}
{if !$order->hasBeenDelivered()}<div style="float: left;"><a href="#" class="add_product button"><img src="../img/admin/add.gif" alt="{l s='Add a product'}" /> {l s='Add a product'}</a></div>{/if} {if !$order->hasBeenDelivered()}
<div style="float: right; margin-right: 10px" id="refundForm"> <div >
<a href="#" class="add_product btn btn-default">
<i class="icon-plus-sign"></i>
{l s='Add a product'}
</a>
</div>
{/if}
<div id="refundForm">
<!-- <!--
<a href="#" class="standard_refund"><img src="../img/admin/add.gif" alt="{l s='Process a standard refund'}" /> {l s='Process a standard refund'}</a> <a href="#" class="standard_refund"><img src="../img/admin/add.gif" alt="{l s='Process a standard refund'}" /> {l s='Process a standard refund'}</a>
<a href="#" class="partial_refund"><img src="../img/admin/add.gif" alt="{l s='Process a partial refund'}" /> {l s='Process a partial refund'}</a> <a href="#" class="partial_refund"><img src="../img/admin/add.gif" alt="{l s='Process a partial refund'}" /> {l s='Process a partial refund'}</a>
--> -->
</div> </div>
{/if} {/if}
<table style="width: 100%;" cellspacing="0" cellpadding="0" class="table" id="orderProducts"> <table class="table" id="orderProducts">
<tr> <thead>
<th height="39" align="center" style="width: 7%">&nbsp;</th> <tr>
<th>{l s='Product'}</th> <th>&nbsp;</th>
<th style="width: 15%; text-align: center">{l s='Unit Price'} <sup>*</sup></th> <th><span class="title_box ">{l s='Product'}</span></th>
<th style="width: 4%; text-align: center">{l s='Qty'}</th> <th><span class="title_box ">{l s='Unit Price'} <sup>*</sup></span></th>
{if $display_warehouse}<th style="text-align: center">{l s='Warehouse'}</th>{/if} <th><span class="title_box ">{l s='Qty'}</th>
{if ($order->hasBeenPaid())}<th style="width: 3%; text-align: center">{l s='Refunded'}</th>{/if} {if $display_warehouse}<th><span class="title_box ">{l s='Warehouse'}</span></th>{/if}
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<th style="width: 3%; text-align: center">{l s='Returned'}</th>{/if} {if ($order->hasBeenPaid())}<th><span class="title_box ">{l s='Refunded'}</span></th>{/if}
{if $stock_management}<th style="width: 10%; text-align: center">{l s='Available quantity'}</th>{/if} {if ($order->hasBeenDelivered() || $order->hasProductReturned())}<th><span class="title_box ">{l s='Returned'}</span></th>{/if}
<th style="width: 10%; text-align: center">{l s='Total'} <sup>*</sup></th> {if $stock_management}<th><span class="title_box ">{l s='Available quantity'}</span></th>{/if}
<th colspan="2" style="display: none;" class="add_product_fields">&nbsp;</th> <th><span class="title_box ">{l s='Total'} <sup>*</sup></span></th>
<th colspan="2" style="display: none;" class="edit_product_fields">&nbsp;</th> <th colspan="2" style="display: none;" class="add_product_fields"></th>
<th colspan="2" style="display: none;" class="standard_refund_fields"><img src="../img/admin/delete.gif" alt="{l s='Products:'}" /> <th colspan="2" style="display: none;" class="edit_product_fields"></th>
{if ($order->hasBeenDelivered() || $order->hasBeenShipped())} <th colspan="2" style="display: none;" class="standard_refund_fields">
{l s='Return'} <i class="icon-minus-sign"></i>
{elseif ($order->hasBeenPaid())} {if ($order->hasBeenDelivered() || $order->hasBeenShipped())}
{l s='Refund'} {l s='Return'}
{else} {elseif ($order->hasBeenPaid())}
{l s='Cancel'} {l s='Refund'}
{else}
{l s='Cancel'}
{/if}
</th>
<th style="display:none" class="partial_refund_fields">
{l s='Partial refund'}
</th>
{if !$order->hasBeenDelivered()}
<th></th>
{/if} {/if}
</th> </tr>
<th style="width: 12%;text-align:right;display:none" class="partial_refund_fields"> </thead>
{l s='Partial refund'} <tbody>
</th>
{if !$order->hasBeenDelivered()}
<th style="width: 8%;text-align:center;">
{l s='Action'}
</th>
{/if}
</tr>
{foreach from=$products item=product key=k} {foreach from=$products item=product key=k}
{* Include customized datas partial *} {* Include customized datas partial *}
{include file='controllers/orders/_customized_data.tpl'} {include file='controllers/orders/_customized_data.tpl'}
@@ -617,124 +652,147 @@
{if $can_edit} {if $can_edit}
{include file='controllers/orders/_new_product.tpl'} {include file='controllers/orders/_new_product.tpl'}
{/if} {/if}
</tbody>
</table> </table>
<div style="float:left; width:280px; margin-top:15px;"> <div class="alert alert-warning">
<sup>*</sup> {l s='For this customer group, prices are displayed as:'} <sup>*</sup> {l s='For this customer group, prices are displayed as:'}
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{l s='tax excluded.'} {l s='tax excluded.'}
{else} {else}
{l s='tax included.'} {l s='tax included.'}
{/if} {/if}
{if !Configuration::get('PS_ORDER_RETURN')} {if !Configuration::get('PS_ORDER_RETURN')}
<br /><br />{l s='Merchandise returns are disabled'} {l s='Merchandise returns are disabled'}
{/if} {/if}
</div> </div>
<div style="float:right; margin-top: 20px;"> <div>
<table class="table" width="450px;" style="border-radius:0px;"cellspacing="0" cellpadding="0"> <table class="table">
<tr id="total_products"> <tr id="total_products">
<td width="150px;"><b>{l s='Products:'}</b></td> <td>{l s='Products:'}</td>
<td class="amount" align="right">{displayPrice price=$order->total_products_wt currency=$currency->id}</td> <td class="amount">{displayPrice price=$order->total_products_wt currency=$currency->id}</td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}> <tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
<td><b>{l s='Discounts'}</b></td> <td>{l s='Discounts'}</td>
<td class="amount" align="right">-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</td> <td class="amount">-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
<tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}> <tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}>
<td><b>{l s='Wrapping'}</b></td> <td>{l s='Wrapping'}</td>
<td class="amount" align="right">{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}</td> <td class="amount">{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}</td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
<tr id="total_shipping"> <tr id="total_shipping">
<td><b>{l s='Shipping'}</b></td> <td>{l s='Shipping'}</td>
<td class="amount" align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td> <td class="amount" >{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td>
<td class="partial_refund_fields current-edit" style="display:none;">{$currency->prefix}<input type="text" size="3" name="partialRefundShippingCost" value="0" />{$currency->suffix}</td> <td class="partial_refund_fields current-edit" style="display:none;">
{$currency->prefix}
<input type="text" size="3" name="partialRefundShippingCost" value="0" />
{$currency->suffix}
</td>
</tr> </tr>
<tr style="font-size: 20px" id="total_order"> <tr id="total_order">
<td style="font-size: 20px">{l s='Total'}</td> <td>{l s='Total'}</td>
<td class="amount" style="font-size: 20px" align="right"> <td class="amount">
{displayPrice price=$order->total_paid_tax_incl currency=$currency->id} {displayPrice price=$order->total_paid_tax_incl currency=$currency->id}
</td> </td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
</table> </table>
</div> </div>
<div class="clear"></div>
{if (sizeof($discounts) || $can_edit)} {if (sizeof($discounts) || $can_edit)}
<div style="float:right; width:450px; margin-top:15px;"> <div>
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <table class="table">
<thead>
<tr> <tr>
<th><img src="../img/admin/coupon.gif" alt="{l s='Discounts'}" />{l s='Discount name'}</th> <th>
<th align="center" style="width: 100px">{l s='Value'}</th> <span class="title_box ">
{if $can_edit}<th align="center" style="width: 30px">{l s='Action'}</th>{/if} <img src="../img/admin/coupon.gif" alt="{l s='Discounts'}" />
{l s='Discount name'}
</span>
</th>
<th><span class="title_box ">{l s='Value'}</span></th>
{if $can_edit}<th></th>{/if}
</tr> </tr>
</thead>
<tbody>
{foreach from=$discounts item=discount} {foreach from=$discounts item=discount}
<tr> <tr>
<td>{$discount['name']}</td> <td>{$discount['name']}</td>
<td align="center"> <td>
{if $discount['value'] != 0.00} {if $discount['value'] != 0.00}
- -
{/if} {/if}
{displayPrice price=$discount['value'] currency=$currency->id} {displayPrice price=$discount['value'] currency=$currency->id}
</td> </td>
{if $can_edit} {if $can_edit}
<td class="center"> <td>
<a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a> <a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<i class="icon-minus-sign"></i>
{l s='Delete voucher'}
</a>
</td> </td>
{/if} {/if}
</tr> </tr>
{/foreach} {/foreach}
{if $can_edit} {if $can_edit}
<tr> <tr>
<td colspan="3" class="center"> <td colspan="3">
<a class="button" href="#" id="add_voucher"><img src="../img/admin/add.gif" alt="{l s='Add'}" /> {l s='Add a new discount'}</a> <a class="btn btn-default" href="#" id="add_voucher">
</td> <i class="icon-plus-sign"></i>
</tr> {l s='Add a new discount'}
<tr style="display: none" > </a>
<td colspan="3" class="current-edit" id="voucher_form"> </td>
{include file='controllers/orders/_discount_form.tpl'} </tr>
</td> <tr style="display: none" >
</tr> <td colspan="3" class="current-edit" id="voucher_form">
{/if} {include file='controllers/orders/_discount_form.tpl'}
</td>
</tr>
{/if}
</tbody>
</table> </table>
</div> </div>
{/if} {/if}
</div> </div>
<div style="clear:both; height:15px;">&nbsp;</div> <div style="display: none;" class="standard_refund_fields">
<div style="float: right; width: 160px; display: none;" class="standard_refund_fields">
{if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))} {if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))}
<input type="checkbox" name="reinjectQuantities" class="button" />&nbsp;<label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label><br /> <input type="checkbox" name="reinjectQuantities" class="btn btn-default" />
<label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label>
{/if} {/if}
{if ((!$order->hasBeenDelivered() && $order->hasBeenPaid()) || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))} {if ((!$order->hasBeenDelivered() && $order->hasBeenPaid()) || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
<input type="checkbox" id="generateCreditSlip" name="generateCreditSlip" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateCreditSlip" style="float:none; font-weight:normal;">{l s='Generate a credit card slip'}</label><br /> <input type="checkbox" id="generateCreditSlip" name="generateCreditSlip" class="btn btn-default" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateCreditSlip" style="float:none; font-weight:normal;">{l s='Generate a credit card slip'}</label><br />
<input type="checkbox" id="generateDiscount" name="generateDiscount" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br /> <input type="checkbox" id="generateDiscount" name="generateDiscount" class="btn btn-default" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br />
<span id="spanShippingBack" style="display:none;"><input type="checkbox" id="shippingBack" name="shippingBack" class="button" />&nbsp;<label for="shippingBack" style="float:none; font-weight:normal;">{l s='Repay shipping costs'}</label><br /></span> <span id="spanShippingBack" style="display:none;"><input type="checkbox" id="shippingBack" name="shippingBack" class="btn btn-default" />&nbsp;<label for="shippingBack" style="float:none; font-weight:normal;">{l s='Repay shipping costs'}</label><br /></span>
{/if} {/if}
{if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))} {if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
<div style="text-align:center; margin-top:5px;"> <div style="text-align:center; margin-top:5px;">
<input type="submit" name="cancelProduct" value="{if $order->hasBeenDelivered()}{l s='Return products'}{elseif $order->hasBeenPaid()}{l s='Refund products'}{else}{l s='Cancel products'}{/if}" class="button" style="margin-top:8px;" /> <input type="submit" name="cancelProduct" value="{if $order->hasBeenDelivered()}{l s='Return products'}{elseif $order->hasBeenPaid()}{l s='Refund products'}{else}{l s='Cancel products'}{/if}" class="btn btn-default" />
</div> </div>
{/if} {/if}
</div> </div>
<div style="float: right; width: 160px; display:none;" class="partial_refund_fields"> <div style="display:none;" class="partial_refund_fields">
<input type="checkbox" name="reinjectQuantities" class="button" />&nbsp;<label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label><br /> <input type="checkbox" name="reinjectQuantities" class="btn btn-default" />
<input type="checkbox" id="generateDiscountRefund" name="generateDiscountRefund" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br /> <label for="reinjectQuantities">{l s='Re-stock products'}</label>
<input type="submit" name="partialRefund" value="{l s='Partial refund'}" class="button" style="margin-top:8px;" /> <input type="checkbox" id="generateDiscountRefund" name="generateDiscountRefund" class="btn btn-default" onclick="toggleShippingCost(this)" />
<label for="generateDiscount">{l s='Generate a voucher'}</label>
<input type="submit" name="partialRefund" value="{l s='Partial refund'}" class="btn btn-default" />
</div> </div>
</fieldset> </fieldset>
</form> </form>
<div class="clear" style="height:20px;">&nbsp;</div>
<div style="float: left"> <div>
<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?'}');"> <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;"> <fieldset >
<h3 style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</h3> <h3 style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false">
<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;"> <i class="icon-envelope"></i>
{l s='New message'}
</h3>
<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}">
<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> <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> </div>
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br> <a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br>
@@ -744,31 +802,39 @@
{foreach from=$orderMessages item=orderMessage} {foreach from=$orderMessages item=orderMessage}
<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option> <option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>
{/foreach} {/foreach}
</select><br /><br /> </select>
<b>{l s='Display to customer?'}</b> <b>{l s='Display to customer?'}</b>
<input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'} <input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'}
<input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'} <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 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br /> <p id="nbchars"></p>
<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 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea>
<input type="hidden" name="id_order" value="{$order->id}" /> <input type="hidden" name="id_order" value="{$order->id}" />
<input type="hidden" name="id_customer" value="{$order->id_customer}" /> <input type="hidden" name="id_customer" value="{$order->id_customer}" />
<input type="submit" class="button" name="submitMessage" value="{l s='Send'}" /> <input type="submit" class="btn btn-default" name="submitMessage" value="{l s='Send'}" />
</div> </div>
</fieldset> </fieldset>
</form> </form>
{if (sizeof($messages))} {if (sizeof($messages))}
<br /> <fieldset>
<fieldset style="width: 400px;"> <h3>
<h3><img src="../img/admin/email.gif" /> {l s='Messages'}</h3> <i class="icon-envelope-alt"></i>
{l s='Messages'}
</h3>
{foreach from=$messages item=message} {foreach from=$messages item=message}
<div style="overflow:auto; width:400px;" {if $message['is_new_for_me']}class="new_message"{/if}> <div {if $message['is_new_for_me']}class="new_message"{/if}>
{if ($message['is_new_for_me'])} {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> <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} {/if}
{l s='At'} <i>{dateFormat date=$message['date_add']} {l s='At'} <i>{dateFormat date=$message['date_add']}</i>
</i> {l s='from'} <b>{if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if}</b> {l s='from'} <b>{if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if}</b>
{if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private'}</span>{/if} {if ($message['private'] == 1)}
<span style="color:red; font-weight:bold;">{l s='Private'}</span>
{/if}
<p>{$message['message']|escape:'htmlall':'UTF-8'|nl2br}</p> <p>{$message['message']|escape:'htmlall':'UTF-8'|nl2br}</p>
</div> </div>
{/foreach} {/foreach}
@@ -776,5 +842,8 @@
{/if} {/if}
</div> </div>
<a href="{$current_index}&token={$smarty.get.token}"><img src="../img/admin/arrow2.gif" /> {l s='Back to list'}</a> <a class="btn btn-default" href="{$current_index}&token={$smarty.get.token}">
<i class="icon-arrow-left"></i>
{l s='Back to list'}
</a>
{/block} {/block}