// Orders WIP

This commit is contained in:
Kevin Granger committed 2013-10-08 12:26:48 +02:00
1 parent b7e13e2e7f
commit 3e6f425bd4
6 files changed
+320 -289

No files matched your search

+4 -4
View File
@@ -1510,7 +1510,7 @@ input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-i
display: block; display: block;
width: 100%; width: 100%;
height: 27px; height: 27px;
padding: 4px 12px; padding: 4px 8px;
font-size: 12px; font-size: 12px;
line-height: 1.42857; line-height: 1.42857;
color: #555555; color: #555555;
@@ -1732,7 +1732,7 @@ textarea.input-lg, .input-group-lg > textarea, .input-group-lg > textarea.input-
/* line 10, ../bower_components/sass-bootstrap/lib/_buttons.scss */ /* line 10, ../bower_components/sass-bootstrap/lib/_buttons.scss */
.btn { .btn {
display: inline-block; display: inline-block;
padding: 4px 12px; padding: 4px 8px;
margin-bottom: 0; margin-bottom: 0;
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
@@ -3170,7 +3170,7 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto
/* line 59, ../bower_components/sass-bootstrap/lib/_input-groups.scss */ /* line 59, ../bower_components/sass-bootstrap/lib/_input-groups.scss */
.input-group-addon { .input-group-addon {
padding: 4px 12px; padding: 4px 8px;
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
line-height: 1; line-height: 1;
@@ -3842,7 +3842,7 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto
.pagination > li > a, .pagination > li > span { .pagination > li > a, .pagination > li > span {
position: relative; position: relative;
float: left; float: left;
padding: 4px 12px; padding: 4px 8px;
line-height: 1.42857; line-height: 1.42857;
text-decoration: none; text-decoration: none;
background-color: white; background-color: white;
@@ -64,7 +64,7 @@ $headings-font-weight: 300 ;
// Based on 14px font-size and 1.428 line-height (~20px to start) // Based on 14px font-size and 1.428 line-height (~20px to start)
$padding-base-vertical: 4px ; $padding-base-vertical: 4px ;
// $padding-base-horizontal: 12px ; $padding-base-horizontal: 8px ;
// $padding-large-vertical: 14px ; // $padding-large-vertical: 14px ;
// $padding-large-horizontal: 16px ; // $padding-large-horizontal: 16px ;
@@ -23,7 +23,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<div class="form-horizontal"> <div class="form-horizontal well">
<div class="form-group"> <div class="form-group">
<label class="control-label col-lg-3"> <label class="control-label col-lg-3">
{l s='Name'} {l s='Name'}
@@ -95,7 +95,7 @@
</div> </div>
{/if} {/if}
<div class="form-group"> <div class="row">
<div class="col-lg-9 col-lg-offset-3"> <div class="col-lg-9 col-lg-offset-3">
<button class="btn btn-default" type="button" id="cancel_add_voucher"> <button class="btn btn-default" type="button" id="cancel_add_voucher">
<i class="icon-remove text-danger"></i> <i class="icon-remove text-danger"></i>
@@ -48,7 +48,7 @@
</td> </td>
<td style="display:none;"> <td style="display:none;">
<div class="form-group"> <div class="row">
<div class="input-group fixed-width-xl"> <div class="input-group fixed-width-xl">
<div class="input-group-addon"> <div class="input-group-addon">
{$currency->sign} {$currency->sign}
@@ -57,7 +57,7 @@
<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" disabled="disabled" /> <input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" disabled="disabled" />
</div> </div>
</div> </div>
<div class="form-group"> <div class="row">
<div class="input-group fixed-width-xl"> <div class="input-group fixed-width-xl">
<div class="input-group-addon"> <div class="input-group-addon">
{$currency->sign} {$currency->sign}
@@ -186,8 +186,8 @@
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
<!-- Customer informations --> <!-- Customer informations -->
{if $customer->id}
<div class="panel"> <div class="panel">
{if $customer->id}
<h3> <h3>
<i class="icon-user"></i> <i class="icon-user"></i>
{l s='Customer information'} {l s='Customer information'}
@@ -220,121 +220,126 @@
</div> </div>
{/if} {/if}
{else} {else}
<ul> <ul class="list-unstyled">
<li>{l s='Account registered:'} <strong>{dateFormat date=$customer->date_add full=true}</strong></li> <li>{l s='Account registered:'} <strong>{dateFormat date=$customer->date_add full=true}</strong></li>
<li>{l s='Valid orders placed:'} <strong>{$customerStats['nb_orders']}</strong></li> <li>{l s='Valid orders placed:'} <strong>{$customerStats['nb_orders']}</strong></li>
<li>{l s='Total spent since registration:'} <strong>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</strong></li> <li>{l s='Total spent since registration:'} <strong>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</strong></li>
</ul> </ul>
{/if} {/if}
</div>
{/if} {/if}
<!-- Documents block --> <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?'}');">
<div class="panel"> <!-- <fieldset>
<h3> <h3>
<i class="icon-file-text"></i> <i class="icon-envelope"></i>
{l s='Documents'} {l s='New message'}
</h3> </h3>
{* Include document template *} <p id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}">
{include file='controllers/orders/_documents.tpl'} {l s='to add a comment or send a message to the customer.'}
</p> -->
<div id="message" class="form-horizontal well" style="display:none">
<div class="form-group">
<label class="control-label col-lg-3">{l s='Choose a standard message'}</label>
<div class="col-lg-9">
<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">--</option>
{foreach from=$orderMessages item=orderMessage}
<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">{l s='Display to customer?'}</label>
<div class="col-lg-9">
<div class="row">
<div class="input-group col-lg-2">
<span class="switch prestashop-switch">
<input type="radio" name="visibility" id="visibility_on" value="0" />
<label class="radio" for="visibility_on">
<i class="icon-check-sign text-success"></i>
{l s='Yes'}
</label>
<input type="radio" name="visibility" id="visibility_off" value="1" checked="checked" />
<label class="radio" for="visibility_off">
<i class="icon-ban-circle text-danger"></i>
{l s='No'}
</label>
<span class="slide-button btn btn-default"></span>
</span>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="panel"> <div class="form-group">
<label class="control-label col-lg-3">{l s='Message'}</label>
<div class="col-lg-9">
<textarea id="txt_msg" class="textarea-autosize" name="message">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea>
<p id="nbchars"></p>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-lg-offset-3">
<input type="hidden" name="id_order" value="{$order->id}" />
<input type="hidden" name="id_customer" value="{$order->id_customer}" />
<button type="button" id="cancelMessage" class="btn btn-default">
<i class="icon-remove text-danger"></i>
{l s='Cancel'}
</button>
<button type="submit" id="submitMessage" class="btn btn-default" name="submitMessage">
<i class="icon-ok text-success"></i>
{l s='Send'}
</button>
</div>
</div>
</div>
<hr/>
<button id="newMessage" type="button" class="btn btn-default">
<i class="icon-envelope"></i>
{l s='New message'}
</button>
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">
<b>{l s='Click here'}</b> {l s='to see all messages.'}
<i class="icon-external-link"></i>
</a>
</div>
</form>
</div>
</div>
<div>
<ul class="nav nav-tabs" id="myTab"> <ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#home">Home</a></li> <li class="active"><a href="#payment">
<li><a href="#profile">Profile</a></li> <i class="icon-money"></i>
<li><a href="#messages">Messages</a></li> Payment</a>
</li>
<li><a href="#shipping">
<i class="icon-truck"></i>
Shipping</a>
</li>
<li><a href="#returns">
<i class="icon-undo"></i>
Merchandise Returns</a>
</li>
<li><a href="#documents">
<i class="icon-file-text"></i>
Documents</a>
</li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="home">1</div> <div class="tab-pane active" id="payment">
<div class="tab-pane" id="profile">2</div>
<div class="tab-pane" id="messages">3</div>
</div>
</div>
<script>
$('#myTab a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
</script>
<!-- Sources block -->
{if (sizeof($sources))}
<fieldset>
<h3>
<i class="icon-globe"></i>
{l s='Sources'}
</h3>
<ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}>
{foreach from=$sources item=source}
<li>
{dateFormat date=$source['date_add'] full=true}<br />
<b>{l s='From'}</b>{if $source['http_referer'] != ''}<a href="{$source['http_referer']}">{parse_url($source['http_referer'], $smarty.const.PHP_URL_HOST)|regex_replace:'/^www./':''}</a>{else}-{/if}<br />
<b>{l s='To'}</b> <a href="http://{$source['request_uri']}">{$source['request_uri']|truncate:100:'...'}</a><br />
{if $source['keywords']}<b>{l s='Keywords'}</b> {$source['keywords']}<br />{/if}<br />
</li>
{/foreach}
</ul>
</fieldset>
{/if}
<!-- linked orders block -->
{if count($order->getBrother()) > 0}
<div class="panel">
<h3>
<i class="icon-cart"></i>
{l s='Linked orders'}
</h3>
<table class="table">
<thead>
<tr>
<th>
{l s='Order no. '}
</th>
<th>
{l s='Status'}
</th>
<th>
{l s='Amount'}
</th>
<th></th>
</tr>
</thead>
<tbody>
{foreach $order->getBrother() as $brother_order}
<tr>
<td>
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">#{'%06d'|sprintf:$brother_order->id}</a>
</td>
<td>
{$brother_order->getCurrentOrderState()->name[$current_id_lang]}
</td>
<td>
{displayPrice price=$brother_order->total_paid_tax_incl currency=$currency->id}
</td>
<td>
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<i class="icon-eye-open"></i>
{l s='See the order'}
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
<!-- Payments block --> <!-- Payments block -->
<fieldset> <fieldset>
<h3> <h3>
<i class="icon-money"></i> <i class="icon-money"></i>
{l s='Payment'} {l s='Payment'}
</h3> </h3>
{if count($order->getOrderPayments()) > 0} {if count($order->getOrderPayments()) > 0}
<p class="alert alert-danger" style="{if round($orders_total_paid_tax_incl, 2) == round($total_paid, 2) || $currentState->id == 6}display: none;{/if}"> <p class="alert alert-danger" style="{if round($orders_total_paid_tax_incl, 2) == round($total_paid, 2) || $currentState->id == 6}display: none;{/if}">
{l s='Warning'} {l s='Warning'}
@@ -356,7 +361,6 @@
{/foreach} {/foreach}
</p> </p>
{/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"> <table class="table">
<thead> <thead>
@@ -500,9 +504,14 @@
</form> </form>
{/if} {/if}
</fieldset> </fieldset>
</div>
<div class="tab-pane" id="shipping">
<div class="panel">
<div class="row">
<!-- Shipping block --> <!-- Shipping block -->
{if !$order->isVirtual()} {if !$order->isVirtual()}
<div class="col-lg-6">
<fieldset class="form-horizontal"> <fieldset class="form-horizontal">
<h3> <h3>
<i class="icon-truck"></i> <i class="icon-truck"></i>
@@ -558,10 +567,120 @@
{$carrierModuleCall} {$carrierModuleCall}
{/if} {/if}
</fieldset> </fieldset>
</div>
{/if}
<!-- Addresses -->
{if !$order->isVirtual()}
<div class="col-lg-3">
<!-- Shipping address -->
<fieldset>
<h3>
<i class="icon-map-marker"></i>
{l s='Shipping address'}
</h3>
{if $can_edit}
<form class="form-horizontal" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}">
<div class="form-group">
<div class="col-lg-9">
<select name="id_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>
{/foreach}
</select>
</div>
<div class="col-lg-3">
<input class="btn btn-default" type="submit" name="submitAddressShipping" value="{l s='Change'}" />
</div>
</div>
</form>
{/if}
<div class="well">
<a class="btn btn-default pull-right" 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}">
<i class="icon-pencil"></i>
{l s='Edit'}
</a>
{displayAddressDetail address=$addresses.delivery newLine='<br />'}
{if $addresses.delivery->other}
<hr />{$addresses.delivery->other}<br />
{/if}
</div>
<img src="http://maps.googleapis.com/maps/api/staticmap?center={$addresses.delivery->address1} {$addresses.delivery->postcode} {$addresses.delivery->city} {if ($addresses.delivery->id_state)} {$addresses.deliveryState->name}{/if}&markers={$addresses.delivery->address1} {$addresses.delivery->postcode} {$addresses.delivery->city} {if ($addresses.delivery->id_state)} {$addresses.deliveryState->name}{/if}&zoom=7&size=600x200&scale=2&sensor=false" class="thumbnail" alt="">
</fieldset>
</div>
{/if}
<!-- Invoice address -->
<div class="col-lg-3">
<fieldset>
<h3>
<i class="icon-file-text"></i>
{l s='Invoice address'}
</h3>
{if $can_edit}
<form class="form-horizontal" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}">
<div class="form-group">
<div class="col-lg-9">
<select name="id_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>
{/foreach}
</select>
</div>
<div class="col-lg-3">
<input class="btn btn-default" type="submit" name="submitAddressInvoice" value="{l s='Change'}" />
</div>
</div>
</form>
{/if}
<div class="well">
<a class="btn btn-default pull-right" 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'}">
<i class="icon-pencil"></i>
{l s='Edit'}
</a>
{displayAddressDetail address=$addresses.invoice newLine='<br />'}
{if $addresses.invoice->other}
<hr />{$addresses.invoice->other}<br />
{/if}
</div>
</fieldset>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="documents">
<!-- Documents block -->
<div class="panel">
<h3>
<i class="icon-file-text"></i>
{l s='Documents'}
</h3>
{* Include document template *}
{include file='controllers/orders/_documents.tpl'}
</div>
</div>
<div class="tab-pane" id="returns">
{if !$order->isVirtual()}
<!-- Return block --> <!-- Return block -->
<fieldset> <fieldset>
<h3> <h3>
<i class="icon-reply"></i> <i class="icon-return"></i>
{l s='Merchandise returns'} {l s='Merchandise returns'}
</h3> </h3>
@@ -616,98 +735,85 @@
{/if} {/if}
</fieldset> </fieldset>
{/if} {/if}
</div>
<div class="row"> </div>
<!-- Addresses --> </div>
{if !$order->isVirtual()} <script>
<div class="col-lg-6"> $('#myTab a').click(function (e) {
<!-- Shipping address --> e.preventDefault()
$(this).tab('show')
})
</script>
<!-- Sources block -->
{if (sizeof($sources))}
<fieldset> <fieldset>
<h3> <h3>
<i class="icon-map-marker"></i> <i class="icon-globe"></i>
{l s='Shipping address'} {l s='Sources'}
</h3> </h3>
{if $can_edit} <ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}>
<form class="form-horizontal" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}"> {foreach from=$sources item=source}
<div class="form-group"> <li>
<div class="col-lg-9"> {dateFormat date=$source['date_add'] full=true}<br />
<select name="id_address"> <b>{l s='From'}</b>{if $source['http_referer'] != ''}<a href="{$source['http_referer']}">{parse_url($source['http_referer'], $smarty.const.PHP_URL_HOST)|regex_replace:'/^www./':''}</a>{else}-{/if}<br />
{foreach from=$customer_addresses item=address} <b>{l s='To'}</b> <a href="http://{$source['request_uri']}">{$source['request_uri']|truncate:100:'...'}</a><br />
<option value="{$address['id_address']}" {if $source['keywords']}<b>{l s='Keywords'}</b> {$source['keywords']}<br />{/if}<br />
{if $address['id_address'] == $order->id_address_delivery} </li>
selected="selected"
{/if}>
{$address['alias']} -
{$address['address1']}
{$address['postcode']}
{$address['city']}
{if !empty($address['state'])}
{$address['state']}
{/if},
{$address['country']}
</option>
{/foreach} {/foreach}
</select> </ul>
</div>
<div class="col-lg-3">
<input class="btn btn-default" type="submit" name="submitAddressShipping" value="{l s='Change'}" />
</div>
</div>
</form>
{/if}
<div class="well">
<a class="btn btn-default pull-right" 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}">
<i class="icon-pencil"></i>
{l s='Edit'}
</a>
{displayAddressDetail address=$addresses.delivery newLine='<br />'}
{if $addresses.delivery->other}
<hr />{$addresses.delivery->other}<br />
{/if}
</div>
<img src="http://maps.googleapis.com/maps/api/staticmap?center={$addresses.delivery->address1} {$addresses.delivery->postcode} {$addresses.delivery->city} {if ($addresses.delivery->id_state)} {$addresses.deliveryState->name}{/if}&markers={$addresses.delivery->address1} {$addresses.delivery->postcode} {$addresses.delivery->city} {if ($addresses.delivery->id_state)} {$addresses.deliveryState->name}{/if}&zoom=7&size=600x200&scale=2&sensor=false" class="thumbnail" alt="">
</fieldset> </fieldset>
</div>
{/if} {/if}
<div class="col-lg-6"> <!-- linked orders block -->
<!-- Invoice address --> {if count($order->getBrother()) > 0}
<fieldset> <div class="panel">
<h3> <h3>
<i class="icon-file-text"></i> <i class="icon-cart"></i>
{l s='Invoice address'} {l s='Linked orders'}
</h3> </h3>
<table class="table">
{if $can_edit} <thead>
<form class="form-horizontal" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}"> <tr>
<div class="form-group"> <th>
<div class="col-lg-9"> {l s='Order no. '}
<select name="id_address"> </th>
{foreach from=$customer_addresses item=address} <th>
<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> {l s='Status'}
{/foreach} </th>
</select> <th>
</div> {l s='Amount'}
<div class="col-lg-3"> </th>
<input class="btn btn-default" type="submit" name="submitAddressInvoice" value="{l s='Change'}" /> <th></th>
</div> </tr>
</div> </thead>
</form> <tbody>
{/if} {foreach $order->getBrother() as $brother_order}
<tr>
<div class="well"> <td>
<a class="btn btn-default pull-right" 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'}"> <a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">#{'%06d'|sprintf:$brother_order->id}</a>
<i class="icon-pencil"></i> </td>
{l s='Edit'} <td>
{$brother_order->getCurrentOrderState()->name[$current_id_lang]}
</td>
<td>
{displayPrice price=$brother_order->total_paid_tax_incl currency=$currency->id}
</td>
<td>
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<i class="icon-eye-open"></i>
{l s='See the order'}
</a> </a>
{displayAddressDetail address=$addresses.invoice newLine='<br />'} </td>
{if $addresses.invoice->other} </tr>
<hr />{$addresses.invoice->other}<br /> {/foreach}
</tbody>
</table>
</div>
{/if} {/if}
</div>
</fieldset>
</div>
</div>
<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.'}');"> <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}" />
@@ -804,8 +910,19 @@
</div> </div>
{/if} {/if}
<div class="row"> <div class="row">
<div class="col-lg-6 panel col-lg-offset-6"> <div class="col-lg-6">
<div class="alert alert-warning">
{l s='For this customer group, prices are displayed as:'}
<strong>{$smarty.capture.TaxMethod}</strong>
{if !Configuration::get('PS_ORDER_RETURN')}
<br/><strong>{l s='Merchandise returns are disabled'}</strong>
{/if}
</div>
</div>
<div class="col-lg-6">
<div class="panel">
{if (sizeof($discounts) || $can_edit)} {if (sizeof($discounts) || $can_edit)}
<table class="table"> <table class="table">
<thead> <thead>
@@ -852,21 +969,7 @@
</div> </div>
{/if} {/if}
</div> </div>
</div> <div class="panel">
<div class="row">
<div class="col-lg-6">
<div class="alert alert-warning">
{l s='For this customer group, prices are displayed as:'}
<strong>{$smarty.capture.TaxMethod}</strong>
{if !Configuration::get('PS_ORDER_RETURN')}
<br/><strong>{l s='Merchandise returns are disabled'}</strong>
{/if}
</div>
</div>
<div class="col-lg-6">
<table class="table"> <table class="table">
<tr id="total_products"> <tr id="total_products">
<td class="text-right">{l s='Products:'}</td> <td class="text-right">{l s='Products:'}</td>
@@ -914,6 +1017,7 @@
</table> </table>
</div> </div>
</div> </div>
</div>
<div style="display: none;" class="standard_refund_fields form-horizontal"> <div style="display: none;" class="standard_refund_fields form-horizontal">
{if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))} {if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))}
<p class="checkbox"> <p class="checkbox">
@@ -970,87 +1074,7 @@
</fieldset> </fieldset>
</form> </form>
<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>
<h3>
<i class="icon-envelope"></i>
{l s='New message'}
</h3>
<p id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}">
{l s='to add a comment or send a message to the customer.'}
</p>
<button id="newMessage" type="button" class="btn btn-default">
<i class="icon-envelope"></i>
{l s='New message'}
</button>
<div id="message" class="form-horizontal" style="display:none">
<div class="form-group">
<label class="control-label col-lg-3">{l s='Choose a standard message'}</label>
<div class="col-lg-9">
<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">--</option>
{foreach from=$orderMessages item=orderMessage}
<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">{l s='Display to customer?'}</label>
<div class="col-lg-9">
<div class="row">
<div class="input-group col-lg-2">
<span class="switch prestashop-switch">
<input type="radio" name="visibility" id="visibility_on" value="0" />
<label class="radio" for="visibility_on">
<i class="icon-check-sign text-success"></i>
{l s='Yes'}
</label>
<input type="radio" name="visibility" id="visibility_off" value="1" checked="checked" />
<label class="radio" for="visibility_off">
<i class="icon-ban-circle text-danger"></i>
{l s='No'}
</label>
<span class="slide-button btn btn-default"></span>
</span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">{l s='Message'}</label>
<div class="col-lg-9">
<textarea id="txt_msg" class="textarea-autosize" name="message">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea>
<p id="nbchars"></p>
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<input type="hidden" name="id_order" value="{$order->id}" />
<input type="hidden" name="id_customer" value="{$order->id_customer}" />
<button type="button" id="cancelMessage" class="btn btn-default">
<i class="icon-remove text-danger"></i>
{l s='Cancel'}
</button>
<button type="submit" id="submitMessage" class="btn btn-default" name="submitMessage">
<i class="icon-ok text-success"></i>
{l s='Send'}
</button>
</div>
</div>
</div>
<hr/>
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">
<b>{l s='Click here'}</b> {l s='to see all messages.'}
<i class="icon-external-link"></i>
</a>
</fieldset>
</form>
{if (sizeof($messages))} {if (sizeof($messages))}
<fieldset> <fieldset>
@@ -185,10 +185,8 @@
if (submited) if (submited)
return false; return false;
submited = true; submited = true;
//add hidden input to emulate submit button click when posting the form -> field name posted //add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />'); btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
$('#{$table}_form').submit(); $('#{$table}_form').submit();
return false; return false;
}); });
@@ -198,7 +196,6 @@
btn_save_and_stay.click(function() { btn_save_and_stay.click(function() {
//add hidden input to emulate submit button click when posting the form -> field name posted //add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />'); btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
$('#{$table}_form').submit(); $('#{$table}_form').submit();
return false; return false;
}); });
@@ -340,11 +337,21 @@
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option> <option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
</select> </select>
{elseif $params.type == 'date' || $params.type == 'datetime'} {elseif $params.type == 'date' || $params.type == 'datetime'}
<div class="date_range form-group"> <div class="date_range row">
<label>{l s='From'}</label> <div class="input-group fixed-width-xl">
<input type="text" class="filter datepicker date-input form-control" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/> <span class="input-group-addon">{l s='From'}</span>
<label>{l s='To'}</label> <input type="text" class="filter datepicker date-input form-control" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"/>
<input type="text" class="filter datepicker date-input form-control" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}"{if isset($params.width)} style="width:70px"{/if}/> <span class="input-group-addon">
<i class="icon-calendar"></i>
</span>
</div>
<div class="input-group fixed-width-xl">
<span class="input-group-addon">{l s='To'}</span>
<input type="text" class="filter datepicker date-input form-control" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}"/>
<span class="input-group-addon">
<i class="icon-calendar"></i>
</span>
</div>
</div> </div>
{elseif $params.type == 'select'} {elseif $params.type == 'select'}
{if isset($params.filter_key)} {if isset($params.filter_key)}