// orders WIP
This commit is contained in:
@@ -8392,6 +8392,17 @@ tr.highlight td {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none; }
|
||||
|
||||
/* line 737, admin-theme.sass */
|
||||
li.sortable-placeholder {
|
||||
border: 1px dashed #cccccc;
|
||||
background-color: #bbbbbb;
|
||||
margin-bottom: 4px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-ms-border-radius: 5px;
|
||||
-o-border-radius: 5px;
|
||||
border-radius: 5px; }
|
||||
|
||||
/* line 1, _nav.sass */
|
||||
#nav-sidebar {
|
||||
float: left;
|
||||
|
||||
@@ -733,6 +733,15 @@ tr.highlight td
|
||||
outline: 0
|
||||
+box-shadow(none)
|
||||
|
||||
//module positions
|
||||
li.sortable-placeholder
|
||||
border: 1px dashed #CCC
|
||||
background-color: #BBB
|
||||
margin-bottom: 4px
|
||||
+border-radius(5px)
|
||||
|
||||
|
||||
|
||||
@import "nav"
|
||||
@import "toggle-switch"
|
||||
@import "carrier-wizard"
|
||||
|
||||
@@ -23,78 +23,94 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{l s='Name'}
|
||||
</label>
|
||||
<input class="form-control" type="text" name="discount_name" value="" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{l s='Type'}
|
||||
</label>
|
||||
<select class="form-control" name="discount_type" id="discount_type">
|
||||
<option value="1">{l s='Percent'}</option>
|
||||
<option value="2">{l s='Amount'}</option>
|
||||
<option value="3">{l s='Free shipping'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div id="discount_value_field">
|
||||
<label class="control-label">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Name'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input class="form-control" type="text" name="discount_name" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Type'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<select class="form-control" name="discount_type" id="discount_type">
|
||||
<option value="1">{l s='Percent'}</option>
|
||||
<option value="2">{l s='Amount'}</option>
|
||||
<option value="3">{l s='Free shipping'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="discount_value_field" class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Value'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
{if ($currency->format % 2)}
|
||||
<span id="discount_currency_sign" class="input-group-addon" style="display: none;">{$currency->sign}</span>
|
||||
{else}
|
||||
<span id="discount_percent_symbol" class="input-group-addon">%</span>
|
||||
{/if}
|
||||
{if !($currency->format % 2)}
|
||||
<span id="discount_currency_sign" class="input-group-addon" style="display: none;">{$currency->sign}</span>
|
||||
{/if}
|
||||
<input class="form-control" type="text" name="discount_value"/>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
{if ($currency->format % 2)}
|
||||
<span id="discount_currency_sign" class="input-group-addon" style="display: none;">{$currency->sign}</span>
|
||||
{else}
|
||||
<span id="discount_percent_symbol" class="input-group-addon">%</span>
|
||||
{/if}
|
||||
|
||||
{if !($currency->format % 2)}
|
||||
<span id="discount_currency_sign" class="input-group-addon" style="display: none;">{$currency->sign}</span>
|
||||
{/if}
|
||||
<input class="form-control" type="text" name="discount_value"/>
|
||||
</div>
|
||||
<p class="text-muted" id="discount_value_help" style="display: none;">
|
||||
{l s='This value must include taxes.'}
|
||||
</p>
|
||||
</div>
|
||||
<p class="text-muted" id="discount_value_help" style="display: none;">
|
||||
{l s='This value must include taxes.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $order->hasInvoice()}
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{l s='Invoice'}
|
||||
</label>
|
||||
<select name="discount_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" selected="selected">
|
||||
{$invoice->getInvoiceNumberFormatted($current_id_lang)} - {displayPrice price=$invoice->total_paid_tax_incl currency=$order->id_currency}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<p class="checkbox">
|
||||
<label class="control-label" for="discount_all_invoices">
|
||||
<input type="checkbox" name="discount_all_invoices" id="discount_all_invoices" value="1" />
|
||||
{l s='Apply on all invoices'}
|
||||
{if $order->hasInvoice()}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Invoice'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="help-block">
|
||||
{l s='If you chooses to create this discount for all invoices, only one discount will be created per order invoice.'}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-lg-9">
|
||||
<select name="discount_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" selected="selected">
|
||||
{$invoice->getInvoiceNumberFormatted($current_id_lang)} - {displayPrice price=$invoice->total_paid_tax_incl currency=$order->id_currency}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button class="btn btn-default" type="submit" name="submitNewVoucher">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Add'}
|
||||
</button>
|
||||
<button class="btn btn-default" type="button" id="cancel_add_voucher">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<p class="checkbox">
|
||||
<label class="control-label" for="discount_all_invoices">
|
||||
<input type="checkbox" name="discount_all_invoices" id="discount_all_invoices" value="1" />
|
||||
{l s='Apply on all invoices'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="help-block">
|
||||
{l s='If you chooses to create this discount for all invoices, only one discount will be created per order invoice.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<button class="btn btn-default" type="submit" name="submitNewVoucher">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Add'}
|
||||
</button>
|
||||
|
||||
<button class="btn btn-default" type="button" id="cancel_add_voucher">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -25,19 +25,19 @@
|
||||
<table class="table" id="documents_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10%">
|
||||
<th>
|
||||
<span class="title_box ">{l s='Date'}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box ">{l s='Document'}</span>
|
||||
</th>
|
||||
<th width="20%">
|
||||
<th>
|
||||
<span class="title_box ">{l s='Number'}</span>
|
||||
</th>
|
||||
<th width="20%">
|
||||
<th>
|
||||
<span class="title_box ">{l s='Amount'}</span>
|
||||
</th>
|
||||
<th width="1%"></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -67,23 +67,32 @@
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
|
||||
{if isset($document->is_delivery)}
|
||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order_invoice={$document->id}">
|
||||
{else}
|
||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
|
||||
{/if}
|
||||
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
|
||||
{/if}
|
||||
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
|
||||
{if isset($document->is_delivery)}
|
||||
#{Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$document->delivery_number}
|
||||
{else}
|
||||
{$document->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}
|
||||
{/if}
|
||||
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
|
||||
#{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
|
||||
{/if} <span class="btn btn-default">
|
||||
|
||||
{/if}
|
||||
|
||||
<span class="btn btn-default">
|
||||
<i class="icon-search"></i>
|
||||
{l s='See the document'}
|
||||
</span>
|
||||
@@ -159,9 +168,9 @@
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">
|
||||
<h4>{l s='No documents are available'}</h4>
|
||||
<i class="icon-warning-sign"></i> {l s='No documents are available'}
|
||||
{if isset($invoice_management_active) && $invoice_management_active}
|
||||
<a class="btn btn-default" href="{$current_index}&viewOrder&submitGenerateInvoice&id_order={$order->id}{if isset($smarty.get.token)}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}{/if}">
|
||||
<a class="btn btn-link" href="{$current_index}&viewOrder&submitGenerateInvoice&id_order={$order->id}{if isset($smarty.get.token)}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}{/if}">
|
||||
<i class="icon-repeat"></i>
|
||||
{l s='Generate invoice'}
|
||||
</a>
|
||||
|
||||
@@ -22,29 +22,46 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tr id="new_product" height="52" style="display:none;background-color:#e9f1f6">
|
||||
<tr id="new_product" style="display:none">
|
||||
<td style="display:none;" colspan="2">
|
||||
<input type="hidden" id="add_product_product_id" name="add_product[product_id]" value="0" />
|
||||
{l s='Product:'} <input type="text" id="add_product_product_name" value="" size="42" />
|
||||
<div id="add_product_product_attribute_area" style="margin-top: 5px;display: none;">
|
||||
{l s='Product:'} <input type="text" id="add_product_product_name" value=""/>
|
||||
<div id="add_product_product_attribute_area" style="display: none;">
|
||||
{l s='Combinations'} <select name="add_product[product_attribute_id]" id="add_product_product_attribute_id"></select>
|
||||
</div>
|
||||
<div id="add_product_product_warehouse_area" style="margin-top: 5px; display: none;">
|
||||
<div id="add_product_product_warehouse_area" style="display: none;">
|
||||
{l s='Warehouse'} <select id="add_product_warehouse" name="add_product_warehouse">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td style="display:none;">
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}<br />
|
||||
{if $currency->sign % 2}
|
||||
{$currency->sign}
|
||||
{/if}
|
||||
<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" disabled="disabled" />
|
||||
{if !($currency->sign % 2)}
|
||||
{$currency->sign}
|
||||
{/if}
|
||||
{l s='tax excl.'}
|
||||
<br />
|
||||
{if $currency->sign % 2}
|
||||
{$currency->sign}
|
||||
{/if}
|
||||
<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" disabled="disabled" />
|
||||
{if !($currency->sign % 2)}
|
||||
{$currency->sign}
|
||||
{/if}
|
||||
{l s='tax incl.'}<br />
|
||||
</td>
|
||||
<td style="display:none;" align="center" class="productQuantity"><input type="text" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" size="3" disabled="disabled" /></td>
|
||||
{if ($order->hasBeenPaid())}<td style="display:none;" align="center" class="productQuantity"> </td>{/if}
|
||||
<td style="display:none;" class="productQuantity">
|
||||
<input type="text" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" disabled="disabled" />
|
||||
</td>
|
||||
{if ($order->hasBeenPaid())}<td style="display:none;" class="productQuantity"> </td>{/if}
|
||||
{if $display_warehouse}<td style="" align="center"> </td>{/if}
|
||||
{if ($order->hasBeenDelivered())}<td style="display:none;" align="center" class="productQuantity"> </td>{/if}
|
||||
<td style="display:none;" align="center" class="productQuantity" id="add_product_product_stock">0</td>
|
||||
<td style="display:none;" align="center" id="add_product_product_total">{displayPrice price=0 currency=$currency->id}</td>
|
||||
<td style="display:none;" align="center" colspan="2">
|
||||
{if ($order->hasBeenDelivered())}<td style="display:none;" class="productQuantity"> </td>{/if}
|
||||
<td style="display:none;" class="productQuantity" id="add_product_product_stock">0</td>
|
||||
<td style="display:none;" id="add_product_product_total">{displayPrice price=0 currency=$currency->id}</td>
|
||||
<td style="display:none;" colspan="2">
|
||||
{if sizeof($invoices_collection)}
|
||||
<select name="add_product[invoice]" id="add_product_product_invoice" disabled="disabled">
|
||||
<optgroup class="existing" label="{l s='Existing'}">
|
||||
@@ -59,10 +76,13 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td style="display:none;">
|
||||
<input type="button" class="button" id="submitAddProduct" value="{l s='Add product'}" disabled="disabled" />
|
||||
<button type="button" class="btn btn-default" id="submitAddProduct" disabled="disabled">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Add product'}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="new_invoice" style="display:none;background-color:#e9f1f6;">
|
||||
<tr id="new_invoice" style="display:none">
|
||||
<td colspan="10">
|
||||
<h3>{l s='New invoice information'}</h3>
|
||||
<label>{l s='Carrier'}</label>
|
||||
|
||||
@@ -31,34 +31,42 @@
|
||||
{/if}
|
||||
|
||||
{if ($product['product_quantity'] > $product['customizationQuantityTotal'])}
|
||||
<tr{if isset($product.image) && $product.image->id && isset($product.image_size)} height="{$product['image_size'][1] + 7}"{/if}>
|
||||
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}</td>
|
||||
<tr class="product-line-row" {if isset($product.image) && $product.image->id && isset($product.image_size)} height="{$product['image_size'][1] + 7}"{/if}>
|
||||
<td>{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}</td>
|
||||
<td><a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
|
||||
<span class="productName">{$product['product_name']}</span><br />
|
||||
{if $product.product_reference}{l s='Ref:'} {$product.product_reference}<br />{/if}
|
||||
{if $product.product_supplier_reference}{l s='Ref Supplier:'} {$product.product_supplier_reference}{/if}
|
||||
</a></td>
|
||||
<td align="center">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="product_price_show">{displayPrice price=$product_price currency=$currency->id}</span>
|
||||
{if $can_edit}
|
||||
<span class="product_price_edit" style="display:none;">
|
||||
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']}" />
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
|
||||
{if $currency->sign % 2}
|
||||
{$currency->sign}
|
||||
{/if}
|
||||
<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}"/>
|
||||
{if !($currency->sign % 2)}{$currency->sign}{/if}
|
||||
{l s='tax excl.'}<br />
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}
|
||||
<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}"/>
|
||||
{if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" class="productQuantity">
|
||||
<td class="productQuantity">
|
||||
<span class="product_quantity_show{if (int)$product['product_quantity'] > 1} red bold{/if}">{$product['product_quantity']}</span>
|
||||
{if $can_edit}
|
||||
<span class="product_quantity_edit" style="display:none;">
|
||||
<input type="text" name="product_quantity" class="edit_product_quantity" value="{$product['product_quantity']|htmlentities}" size="2" />
|
||||
<input type="text" name="product_quantity" class="edit_product_quantity" value="{$product['product_quantity']|htmlentities}"/>
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{if $display_warehouse}<td>{$product.warehouse_name|escape:'htmlall':'UTF-8'}</td>{/if}
|
||||
{if ($order->hasBeenPaid())}
|
||||
<td align="center" class="productQuantity">
|
||||
<td class="productQuantity">
|
||||
{$product['product_quantity_refunded']}
|
||||
{if count($product['refund_history'])}
|
||||
<span class="tooltip">
|
||||
@@ -74,7 +82,7 @@
|
||||
</td>
|
||||
{/if}
|
||||
{if $order->hasBeenDelivered() || $order->hasProductReturned()}
|
||||
<td align="center" class="productQuantity">
|
||||
<td class="productQuantity">
|
||||
{$product['product_quantity_return']}
|
||||
{if count($product['return_history'])}
|
||||
<span class="tooltip">
|
||||
@@ -89,12 +97,12 @@
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if $stock_management}<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>{/if}
|
||||
<td align="center" class="total_product">
|
||||
{if $stock_management}<td class="productQuantity product_stock">{$product['current_stock']}</td>{/if}
|
||||
<td class="total_product">
|
||||
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
|
||||
</td>
|
||||
<td colspan="2" style="display: none;" class="add_product_fields"> </td>
|
||||
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
|
||||
<td class="cancelCheck standard_refund_fields current-edit" style="display:none">
|
||||
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$product['product_quantity_return']}" />
|
||||
<input type="hidden" name="totalQty" id="totalQty" value="{$product['product_quantity']}" />
|
||||
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
|
||||
@@ -108,7 +116,7 @@
|
||||
{if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}
|
||||
<input type="hidden" name="cancelQuantity[{$product['id_order_detail']}]" value="0" />
|
||||
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
|
||||
<input type="text" id="cancelQuantity_{$product['id_order_detail']}" name="cancelQuantity[{$product['id_order_detail']}]" size="2" onclick="selectCheckbox(this);" value="" />
|
||||
<input type="text" id="cancelQuantity_{$product['id_order_detail']}" name="cancelQuantity[{$product['id_order_detail']}]" onclick="selectCheckbox(this);" value="" />
|
||||
{/if}
|
||||
|
||||
{if $product['customizationQuantityTotal']}
|
||||
@@ -125,29 +133,72 @@
|
||||
0/{$productQuantity}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="text-align:left;display:none">
|
||||
<div style="width:40%;margin-top:5px;float:left">{l s='Quantity:'}</div> <div style="width:60%;margin-top:2px;float:left"><input onchange="checkPartialRefundProductQuantity(this)" type="text" size="3" name="partialRefundProductQuantity[{{$product['id_order_detail']}}]" value="0" /> 0/{$productQuantity-$product['product_quantity_refunded']}</div>
|
||||
<div style="width:40%;margin-top:5px;float:left">{l s='Amount:'}</div> <div style="width:60%;margin-top:2px;float:left">{$currency->prefix}<input onchange="checkPartialRefundProductAmount(this)" type="text" size="3" name="partialRefundProduct[{$product['id_order_detail']}]" /> {$currency->suffix}</div> {if !empty($product['amount_refund']) && $product['amount_refund'] > 0}({l s='%s refund' sprintf=$product['amount_refund']}){/if}
|
||||
<td class="partial_refund_fields current-edit" style="display:none;">
|
||||
<div>
|
||||
{l s='Quantity:'}
|
||||
</div>
|
||||
<div>
|
||||
<input onchange="checkPartialRefundProductQuantity(this)" type="text" name="partialRefundProductQuantity[{{$product['id_order_detail']}}]" value="0" />
|
||||
0/{$productQuantity-$product['product_quantity_refunded']}
|
||||
</div>
|
||||
<div>
|
||||
{l s='Amount:'}
|
||||
</div>
|
||||
<div>
|
||||
{$currency->prefix}
|
||||
<input onchange="checkPartialRefundProductAmount(this)" type="text" name="partialRefundProduct[{$product['id_order_detail']}]" />
|
||||
{$currency->suffix}
|
||||
</div>
|
||||
{if !empty($product['amount_refund']) && $product['amount_refund'] > 0}
|
||||
({l s='%s refund' sprintf=$product['amount_refund']})
|
||||
{/if}
|
||||
<input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" />
|
||||
<input type="hidden" value="{$product['amount_refundable']}" class="partialRefundProductAmount" />
|
||||
</td>
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<td class="product_invoice" colspan="2" style="display: none;text-align:center;">
|
||||
<td class="product_invoice" colspan="2" style="display: none;">
|
||||
{if sizeof($invoices_collection)}
|
||||
<select name="product_invoice" class="edit_product_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" {if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}>#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}</option>
|
||||
<option value="{$invoice->id}" {if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}>
|
||||
#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td class="product_action" style="text-align:right">
|
||||
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
|
||||
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
|
||||
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
|
||||
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
|
||||
<td class="product_action">
|
||||
{* edit/delete controls *}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default edit_product_change_link">
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="#" class="delete_product_line">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{* Update controls *}
|
||||
<button type="button" class="btn btn-default submitProductChange" style="display: none;">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Update'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default cancel_product_change_link" style="display: none;">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<input type="submit" class="btn btn-default" name="submitShippingNumber" value="{l s='Update'}" />
|
||||
</span>
|
||||
<a href="#" class="edit_shipping_number_link btn btn-default">
|
||||
<i class="icon-search"></i>
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</a>
|
||||
<a href="#" class="cancel_shipping_number_link btn btn-default" style="display: none;">
|
||||
|
||||
@@ -62,109 +62,124 @@
|
||||
<div>{$hook_invoice}</div>
|
||||
{/if}
|
||||
|
||||
<div class="panel">
|
||||
{if (count($invoices_collection))}
|
||||
<a class="btn btn-default" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank">
|
||||
<i class="icon-file"></i>
|
||||
{l s='View invoice'}
|
||||
</a>
|
||||
{else}
|
||||
<span class="icon-stack">
|
||||
<i class="icon-file"></i>
|
||||
<i class="icon-ban-circle icon-stack-base text-danger"></i>
|
||||
</span>
|
||||
{l s='No invoice'}
|
||||
{/if}
|
||||
{if (($currentState && $currentState->delivery) || $order->delivery_number)}
|
||||
<a class="btn btn-default" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank">
|
||||
<i class="icon-truck"></i>
|
||||
{l s='View delivery slip'}
|
||||
</a>
|
||||
{else}
|
||||
<span class="icon-stack">
|
||||
<i class="icon-truck"></i>
|
||||
<i class="icon-ban-circle icon-stack-base text-danger"></i>
|
||||
</span>
|
||||
{l s='No delivery slip'}
|
||||
{/if}
|
||||
<a class="btn btn-default" href="javascript:window.print()">
|
||||
<i class="icon-print"></i>
|
||||
{l s='Print order'}
|
||||
</a>
|
||||
<hr/>
|
||||
<dl>
|
||||
<dt>{l s='Date'} </dt>
|
||||
<dd>{dateFormat date=$order->date_add full=true}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{l s='Messages:'}</dt>
|
||||
<dd>{sizeof($messages)}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{l s='New Customer Messages:'}</a>
|
||||
</dt>
|
||||
<dd>
|
||||
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{sizeof($customer_thread_message)}</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{l s='Products:'}</dt>
|
||||
<dd id="product_number">{sizeof($products)}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{l s='Total'}</dt>
|
||||
<dd class="total_paid">{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<h3>
|
||||
<i class="icon-time"></i>
|
||||
{l s='Status'}
|
||||
</h3>
|
||||
<!-- Change status form -->
|
||||
<form action="{$currentIndex}&vieworder&token={$smarty.get.token}" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-3">
|
||||
<select id="id_order_state" name="id_order_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>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="submit" name="submitState" class="btn btn-default">
|
||||
<i class="icon-plus-sign"></i>
|
||||
{l s='Add'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- History of status -->
|
||||
<table class="table history-status">
|
||||
<tbody>
|
||||
{foreach from=$history item=row key=key}
|
||||
{if ($key == 0)}
|
||||
<tr class="highlight">
|
||||
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
|
||||
<td><span class="title_box ">{$row['ostate_name']|stripslashes}</span></td>
|
||||
<td><span class="title_box ">{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}</span></td>
|
||||
<td><span class="title_box ">{dateFormat date=$row['date_add'] full=true}</span></td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr>
|
||||
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
|
||||
<td>{$row['ostate_name']|stripslashes}</td>
|
||||
<td>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else} {/if}</td>
|
||||
<td>{dateFormat date=$row['date_add'] full=true}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 box-stats color3" >
|
||||
<i class="icon-calendar-empty"></i>
|
||||
<span class="title">{l s='Date'}<br /><small>sous-titre</small></span>
|
||||
<span class="value">{dateFormat date=$order->date_add full=false}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 box-stats color1" >
|
||||
<i class="icon-comments"></i>
|
||||
<span class="title">{l s='Messages'}<br /><small>sous-titre</small></span>
|
||||
<span class="value">{sizeof($messages)}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 box-stats color1" >
|
||||
<i class="icon-ok"></i>
|
||||
<span class="title">{l s='Products'}<br /><small>sous-titre</small></span>
|
||||
<span class="value">{sizeof($products)}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 box-stats color4" >
|
||||
<i class="icon-money"></i>
|
||||
<span class="title">{l s='Total'}<br /><small>sous-titre</small></span>
|
||||
<span class="value">{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="panel">
|
||||
<h3>
|
||||
<i class="icon-time"></i>
|
||||
{l s='Status'}
|
||||
</h3>
|
||||
<!-- Change status form -->
|
||||
<form action="{$currentIndex}&vieworder&token={$smarty.get.token}" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-9">
|
||||
<select id="id_order_state" name="id_order_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>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="submit" name="submitState" class="btn btn-default">
|
||||
<i class="icon-plus-sign"></i>
|
||||
{l s='Add'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- History of status -->
|
||||
<table class="table history-status">
|
||||
<tbody>
|
||||
{foreach from=$history item=row key=key}
|
||||
{if ($key == 0)}
|
||||
<tr class="highlight">
|
||||
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
|
||||
<td><span class="title_box ">{$row['ostate_name']|stripslashes}</span></td>
|
||||
<td><span class="title_box ">{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}</span></td>
|
||||
<td><span class="title_box ">{dateFormat date=$row['date_add'] full=true}</span></td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr>
|
||||
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
|
||||
<td>{$row['ostate_name']|stripslashes}</td>
|
||||
<td>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else} {/if}</td>
|
||||
<td>{dateFormat date=$row['date_add'] full=true}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="panel">
|
||||
{if (count($invoices_collection))}
|
||||
<a class="btn btn-default" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank">
|
||||
<i class="icon-file"></i>
|
||||
{l s='View invoice'}
|
||||
</a>
|
||||
{else}
|
||||
<span class="icon-stack">
|
||||
<i class="icon-file"></i>
|
||||
<i class="icon-ban-circle icon-stack-base text-danger"></i>
|
||||
</span>
|
||||
{l s='No invoice'}
|
||||
{/if}
|
||||
{if (($currentState && $currentState->delivery) || $order->delivery_number)}
|
||||
<a class="btn btn-default" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank">
|
||||
<i class="icon-truck"></i>
|
||||
{l s='View delivery slip'}
|
||||
</a>
|
||||
{else}
|
||||
<span class="icon-stack">
|
||||
<i class="icon-truck"></i>
|
||||
<i class="icon-ban-circle icon-stack-base text-danger"></i>
|
||||
</span>
|
||||
{l s='No delivery slip'}
|
||||
{/if}
|
||||
<a class="btn btn-default" href="javascript:window.print()">
|
||||
<i class="icon-print"></i>
|
||||
{l s='Print order'}
|
||||
</a>
|
||||
<hr/>
|
||||
<dl>
|
||||
<dt>
|
||||
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{l s='New Customer Messages:'}</a>
|
||||
</dt>
|
||||
<dd>
|
||||
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{sizeof($customer_thread_message)}</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Customer informations -->
|
||||
{if $customer->id}
|
||||
@@ -173,30 +188,42 @@
|
||||
<i class="icon-user"></i>
|
||||
{l s='Customer information'}
|
||||
</h3>
|
||||
<span>
|
||||
<a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$gender->name|escape:'htmlall':'UTF-8'} {$customer->firstname} {$customer->lastname}</a>
|
||||
</span> ({l s='#'}{$customer->id})
|
||||
(<a href="mailto:{$customer->email}">{$customer->email}</a>)
|
||||
<h4>
|
||||
<a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}">
|
||||
{$gender->name|escape:'htmlall':'UTF-8'}
|
||||
{$customer->firstname}
|
||||
{$customer->lastname}
|
||||
</a>
|
||||
<small>
|
||||
({l s='#'}{$customer->id}) -
|
||||
<a href="mailto:{$customer->email}">{$customer->email}</a>
|
||||
</small>
|
||||
</h4>
|
||||
{if ($customer->isGuest())}
|
||||
|
||||
{l s='This order has been placed by a guest.'}
|
||||
{if (!Customer::customerExists($customer->email))}
|
||||
<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}" />
|
||||
<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.'}
|
||||
<input class="btn btn-default" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" />
|
||||
<p class="help-block">{l s='This feature will generate a random password and send an email to the customer.'}</p>
|
||||
</form>
|
||||
{else}
|
||||
<div>
|
||||
<b style="color:red;">{l s='A registered customer account has already claimed this email address'}</b>
|
||||
<b style="color:red;">
|
||||
{l s='A registered customer account has already claimed this email address'}
|
||||
</b>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{else}
|
||||
{l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br />
|
||||
{l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br />
|
||||
{l s='Total spent since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br />
|
||||
<ul>
|
||||
<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='Total spent since registration:'} <strong>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</strong></li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
@@ -204,7 +231,7 @@
|
||||
{if (sizeof($sources))}
|
||||
<fieldset>
|
||||
<h3>
|
||||
<img src="../img/admin/tab-stats.gif" />
|
||||
<i class="icon-globe"></i>
|
||||
{l s='Sources'}
|
||||
</h3>
|
||||
<ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}>
|
||||
@@ -242,7 +269,7 @@
|
||||
{if count($order->getBrother()) > 0}
|
||||
<fieldset>
|
||||
<h3>
|
||||
<img src="../img/admin/tab-orders.gif" />
|
||||
<i class="icon-cart"></i>
|
||||
{l s='Linked orders'}
|
||||
</h3>
|
||||
<table class="table">
|
||||
@@ -273,7 +300,10 @@
|
||||
{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'}"><img alt="{l s='See the order'}" src="../img/admin/details.gif"></a>
|
||||
<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}
|
||||
@@ -285,7 +315,7 @@
|
||||
<!-- Documents block -->
|
||||
<fieldset>
|
||||
<h3>
|
||||
<i class="icon-file"></i>
|
||||
<i class="icon-file-text"></i>
|
||||
{l s='Documents'}
|
||||
</h3>
|
||||
|
||||
@@ -297,27 +327,16 @@
|
||||
<fieldset>
|
||||
<h3>
|
||||
<i class="icon-money"></i>
|
||||
{l s='Payment: '}
|
||||
{l s='Payment'}
|
||||
</h3>
|
||||
{if (!$order->valid && sizeof($currencies) > 1)}
|
||||
<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>
|
||||
<label>{l s='Do not forget to update your exchange rate before making this change.'}</label>
|
||||
<select name="new_currency">
|
||||
{foreach from=$currencies item=currency_change}
|
||||
{if $currency_change['id_currency'] != $order->id_currency}
|
||||
<option value="{$currency_change['id_currency']}">{$currency_change['name']} - {$currency_change['sign']}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="submit" class="btn btn-default" name="submitChangeCurrency" value="{l s='Change'}" />
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
|
||||
{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}">
|
||||
{l s='Warning'} {displayPrice price=$total_paid currency=$currency->id}
|
||||
{l s='paid instead of'} <span class="total_paid">{displayPrice price=$orders_total_paid_tax_incl currency=$currency->id}</span>
|
||||
<p class="alert alert-warning" style="{if round($orders_total_paid_tax_incl, 2) == round($total_paid, 2) || $currentState->id == 6}display: none;{/if}">
|
||||
{l s='Warning'}
|
||||
<strong>{displayPrice price=$total_paid currency=$currency->id}</strong>
|
||||
{l s='paid instead of'}
|
||||
<strong class="total_paid">{displayPrice price=$orders_total_paid_tax_incl currency=$currency->id}</strong>
|
||||
|
||||
{foreach $order->getBrother() as $brother_order}
|
||||
{if $brother_order@first}
|
||||
@@ -327,7 +346,9 @@
|
||||
<br />{l s='This warning also concerns the next orders:'}
|
||||
{/if}
|
||||
{/if}
|
||||
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">#{'%06d'|sprintf:$brother_order->id}</a>
|
||||
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||
#{'%06d'|sprintf:$brother_order->id}
|
||||
</a>
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
@@ -359,7 +380,10 @@
|
||||
{/if}
|
||||
</td>
|
||||
<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>
|
||||
<button class="btn btn-default open_payment_information">
|
||||
<i class="icon-search"></i>
|
||||
{l s='See payment information'}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="payment_information" style="display: none;">
|
||||
@@ -372,7 +396,6 @@
|
||||
<i>{l s='Not defined'}</i>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Brand'}</b>
|
||||
{if $payment->card_brand}
|
||||
@@ -381,7 +404,6 @@
|
||||
<i>{l s='Not defined'}</i>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Expiration'}</b>
|
||||
{if $payment->card_expiration}
|
||||
@@ -390,7 +412,6 @@
|
||||
<i>{l s='Not defined'}</i>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Holder'}</b>
|
||||
{if $payment->card_holder}
|
||||
@@ -403,14 +424,16 @@
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="6" class="center">
|
||||
<td class="text-center" colspan="6">
|
||||
<i class="icon-warning-sign"></i>
|
||||
{l s='No payments are available'}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr class="current-edit">
|
||||
<td><input type="text" name="payment_date" class="datepicker" size="17" value="{date('Y-m-d H:i:s')}" /></td>
|
||||
<td>
|
||||
<input type="text" name="payment_date" class="datepicker" value="{date('Y-m-d H:i:s')}" />
|
||||
</td>
|
||||
<td>
|
||||
<select name="payment_method" class="payment_method">
|
||||
{foreach from=$payment_methods item=payment_method}
|
||||
@@ -439,12 +462,35 @@
|
||||
</td>
|
||||
{/if}
|
||||
<td>
|
||||
<input class="btn btn-default" type="submit" name="submitAddPayment" value="{l s='Add'}" />
|
||||
<button class="btn btn-default" type="submit" name="submitAddPayment">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Add'}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{if (!$order->valid && sizeof($currencies) > 1)}
|
||||
<form class="form-horizontal" method="post" action="{$currentIndex}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||
<label class="control-label col-lg-3">{l s='Change currency'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="new_currency">
|
||||
{foreach from=$currencies item=currency_change}
|
||||
{if $currency_change['id_currency'] != $order->id_currency}
|
||||
<option value="{$currency_change['id_currency']}">{$currency_change['name']} - {$currency_change['sign']}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
<p class="help-block">{l s='Do not forget to update your exchange rate before making this change.'}</p>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<input type="submit" class="btn btn-default" name="submitChangeCurrency" value="{l s='Change'}" />
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
</fieldset>
|
||||
|
||||
<!-- Shipping block -->
|
||||
@@ -668,36 +714,43 @@
|
||||
<fieldset>
|
||||
<h3>
|
||||
<i class="icon-shopping-cart"></i>
|
||||
{l s='Products:'}
|
||||
{l s='Products'}
|
||||
</h3>
|
||||
{if $can_edit}
|
||||
{if !$order->hasBeenDelivered()}
|
||||
<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="partial_refund"><img src="../img/admin/add.gif" alt="{l s='Process a partial refund'}" /> {l s='Process a partial refund'}</a>
|
||||
-->
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{capture "TaxMethod"}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{l s='tax excluded.'}
|
||||
{else}
|
||||
{l s='tax included.'}
|
||||
{/if}
|
||||
{/capture}
|
||||
|
||||
<table class="table" id="orderProducts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><span class="title_box ">{l s='Product'}</span></th>
|
||||
<th><span class="title_box ">{l s='Unit Price'} <sup>*</sup></span></th>
|
||||
<th>
|
||||
<span class="title_box ">{l s='Unit Price'}</span>
|
||||
<small class="text-muted">{$smarty.capture.TaxMethod}</small>
|
||||
</th>
|
||||
<th><span class="title_box ">{l s='Qty'}</th>
|
||||
{if $display_warehouse}<th><span class="title_box ">{l s='Warehouse'}</span></th>{/if}
|
||||
{if ($order->hasBeenPaid())}<th><span class="title_box ">{l s='Refunded'}</span></th>{/if}
|
||||
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<th><span class="title_box ">{l s='Returned'}</span></th>{/if}
|
||||
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}
|
||||
<th><span class="title_box ">{l s='Returned'}</span></th>
|
||||
{/if}
|
||||
{if $stock_management}<th><span class="title_box ">{l s='Available quantity'}</span></th>{/if}
|
||||
<th><span class="title_box ">{l s='Total'} <sup>*</sup></span></th>
|
||||
<th>
|
||||
<span class="title_box ">{l s='Total'}</span>
|
||||
<small class="text-muted">{$smarty.capture.TaxMethod}</small>
|
||||
</th>
|
||||
<th colspan="2" style="display: none;" class="add_product_fields"></th>
|
||||
<th colspan="2" style="display: none;" class="edit_product_fields"></th>
|
||||
<th colspan="2" style="display: none;" class="standard_refund_fields">
|
||||
@@ -732,55 +785,76 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<sup>*</sup> {l s='For this customer group, prices are displayed as:'}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{l s='tax excluded.'}
|
||||
{else}
|
||||
{l s='tax included.'}
|
||||
{/if}
|
||||
{if !Configuration::get('PS_ORDER_RETURN')}
|
||||
{l s='Merchandise returns are disabled'}
|
||||
{/if}
|
||||
{if $can_edit}
|
||||
{if !$order->hasBeenDelivered()}
|
||||
<div class="row-margin-bottom">
|
||||
<a href="#" class="add_product btn btn-default">
|
||||
<i class="icon-plus-sign"></i>
|
||||
{l s='Add a product'}
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<table class="table">
|
||||
<tr id="total_products">
|
||||
<td>{l s='Products:'}</td>
|
||||
<td class="amount">{displayPrice price=$order->total_products_wt currency=$currency->id}</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"> </td>
|
||||
</tr>
|
||||
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td>{l s='Discounts'}</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;"> </td>
|
||||
</tr>
|
||||
<tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td>{l s='Wrapping'}</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;"> </td>
|
||||
</tr>
|
||||
<tr id="total_shipping">
|
||||
<td>{l s='Shipping'}</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>
|
||||
</tr>
|
||||
<tr id="total_order">
|
||||
<td>{l s='Total'}</td>
|
||||
<td class="amount">
|
||||
{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<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">
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Products:'}</td>
|
||||
<td class="amount text-right">
|
||||
{displayPrice price=$order->total_products_wt currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td class="text-right">{l s='Discounts'}</td>
|
||||
<td class="amount text-right">
|
||||
-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
<tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td class="text-right">{l s='Wrapping'}</td>
|
||||
<td class="amount text-right">
|
||||
{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
<tr id="total_shipping">
|
||||
<td class="text-right">{l s='Shipping'}</td>
|
||||
<td class="amount text-right" >
|
||||
{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" name="partialRefundShippingCost" value="0" />
|
||||
{$currency->suffix}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="total_order">
|
||||
<td class="text-right">{l s='Total'}</td>
|
||||
<td class="amount text-right">
|
||||
{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset >
|
||||
{if (sizeof($discounts) || $can_edit)}
|
||||
{if (sizeof($discounts) || $can_edit)}
|
||||
<h3>
|
||||
<i class="icon-ticket"></i>
|
||||
{l s="Discounts"}
|
||||
@@ -793,7 +867,11 @@
|
||||
{l s='Discount name'}
|
||||
</span>
|
||||
</th>
|
||||
<th><span class="title_box ">{l s='Value'}</span></th>
|
||||
<th>
|
||||
<span class="title_box ">
|
||||
{l s='Value'}
|
||||
</span>
|
||||
</th>
|
||||
{if $can_edit}<th></th>{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -819,31 +897,28 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{if $can_edit}
|
||||
<button id="add_discount_btn" class="btn btn-default" type="button" id="add_voucher">
|
||||
{if $can_edit}
|
||||
<button id="add_voucher" class="btn btn-default" type="button" >
|
||||
<i class="icon-plus-sign"></i>
|
||||
{l s='Add a new discount'}
|
||||
</button>
|
||||
<div class="current-edit" id="voucher_form" style="display:none;">
|
||||
{include file='controllers/orders/_discount_form.tpl'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<div style="display: none;" class="standard_refund_fields">
|
||||
{if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))}
|
||||
<input type="checkbox" name="reinjectQuantities" class="btn btn-default" />
|
||||
<label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label>
|
||||
<input type="checkbox" name="reinjectQuantities"/>
|
||||
<label for="reinjectQuantities">{l s='Re-stock products'}</label>
|
||||
{/if}
|
||||
|
||||
{if ((!$order->hasBeenDelivered() && $order->hasBeenPaid()) || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
|
||||
<input type="checkbox" id="generateCreditSlip" name="generateCreditSlip" class="btn btn-default" onclick="toggleShippingCost(this)" />
|
||||
<label for="generateCreditSlip" style="float:none; font-weight:normal;">{l s='Generate a credit card slip'}</label>
|
||||
|
||||
<input type="checkbox" id="generateDiscount" name="generateDiscount" class="btn btn-default" onclick="toggleShippingCost(this)" />
|
||||
<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label>
|
||||
<input type="checkbox" id="generateCreditSlip" name="generateCreditSlip" onclick="toggleShippingCost(this)" />
|
||||
<label for="generateCreditSlip">{l s='Generate a credit card slip'}</label>
|
||||
<input type="checkbox" id="generateDiscount" name="generateDiscount" onclick="toggleShippingCost(this)" />
|
||||
<label for="generateDiscount">{l s='Generate a voucher'}</label>
|
||||
|
||||
<span id="spanShippingBack" style="display:none;">
|
||||
<input type="checkbox" id="shippingBack" name="shippingBack" class="btn btn-default" />
|
||||
@@ -865,30 +940,35 @@
|
||||
</fieldset>
|
||||
</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 style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false">
|
||||
<fieldset>
|
||||
<h3>
|
||||
<i class="icon-envelope"></i>
|
||||
{l s='New message'}
|
||||
</h3>
|
||||
<button type="button" class="btn btn-default" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false">
|
||||
{l s='New message'}
|
||||
</button>
|
||||
<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>
|
||||
|
||||
{l s='to add a comment or send a message to the customer.'}
|
||||
|
||||
</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>
|
||||
<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>
|
||||
<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>
|
||||
<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'}
|
||||
|
||||
<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"></p>
|
||||
<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>
|
||||
|
||||
@@ -908,7 +988,9 @@
|
||||
{foreach from=$messages item=message}
|
||||
<div {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>
|
||||
<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']|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>
|
||||
@@ -921,9 +1003,4 @@
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
|
||||
<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}
|
||||
@@ -65,10 +65,18 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach from=$languages item=language_flag}
|
||||
<li><a href="javascript:hideOtherLanguage({$language_flag.id_lang});" tabindex="-1"><img src="{$base_url}/img/l/{$language_flag.id_lang|intval}.jpg" alt=""> {$language_flag.name}</a></li>
|
||||
<li>
|
||||
<a href="javascript:hideOtherLanguage({$language_flag.id_lang});" tabindex="-1">
|
||||
<img src="{$base_url}/img/l/{$language_flag.id_lang|intval}.jpg" alt="">
|
||||
{$language_flag.name}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<button type="button" class="btn btn-default" onclick="viewTemplates('#template_select_{$language.id_lang}', '../mails/{$language.iso_code}/', '.html');"><i class="icon-eye-open"></i> {l s='Preview'}</button>
|
||||
<button type="button" class="btn btn-default" onclick="viewTemplates('#template_select_{$language.id_lang}', '../mails/{$language.iso_code}/', '.html');">
|
||||
<i class="icon-eye-open"></i>
|
||||
{l s='Preview'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
@@ -93,8 +93,8 @@ class AdminStatusesControllerCore extends AdminController
|
||||
'title' => $this->l('Send email to customer'),
|
||||
'align' => 'center',
|
||||
'icon' => array(
|
||||
'1' => 'enabled.gif',
|
||||
'0' => 'disabled.gif'
|
||||
'1' => 'icon-ok text-success',
|
||||
'0' => 'icon-ban-circle text-danger'
|
||||
),
|
||||
'type' => 'bool',
|
||||
'orderby' => false,
|
||||
@@ -104,8 +104,8 @@ class AdminStatusesControllerCore extends AdminController
|
||||
'title' => $this->l('Delivery'),
|
||||
'align' => 'center',
|
||||
'icon' => array(
|
||||
'1' => 'enabled.gif',
|
||||
'0' => 'disabled.gif'
|
||||
'1' => 'icon-ok text-success',
|
||||
'0' => 'icon-ban-circle text-danger'
|
||||
),
|
||||
'type' => 'bool',
|
||||
'orderby' => false,
|
||||
@@ -116,8 +116,8 @@ class AdminStatusesControllerCore extends AdminController
|
||||
'title' => $this->l('Invoice'),
|
||||
'align' => 'center',
|
||||
'icon' => array(
|
||||
'1' => 'enabled.gif',
|
||||
'0' => 'disabled.gif'
|
||||
'1' => 'icon-ok text-success',
|
||||
'0' => 'icon-ban-circle text-danger'
|
||||
),
|
||||
'type' => 'bool',
|
||||
'orderby' => false,
|
||||
|
||||
+26
-36
@@ -350,12 +350,12 @@ function init()
|
||||
{
|
||||
$('tr#new_product input, tr#new_product select').each(function() {
|
||||
if ($(this).attr('id') != 'add_product_product_name')
|
||||
$('tr#new_product input, tr#new_product select').attr('disabled', true);
|
||||
$('tr#new_product input, tr#new_product select, tr#new_product button').attr('disabled', true);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$('tr#new_product input, tr#new_product select').removeAttr('disabled');
|
||||
$('tr#new_product input, tr#new_product select, tr#new_product button').removeAttr('disabled');
|
||||
// Keep product variable
|
||||
current_product = data;
|
||||
$('#add_product_product_id').val(data.id_product);
|
||||
@@ -576,7 +576,7 @@ function init()
|
||||
ajax: 1,
|
||||
token: token,
|
||||
action: 'loadProductInformation',
|
||||
id_order_detail: $(this).parent().parent().find('input.edit_product_id_order_detail').val(),
|
||||
id_order_detail: $(this).closest('tr.product-line-row').find('input.edit_product_id_order_detail').val(),
|
||||
id_address: id_address,
|
||||
id_order: id_order
|
||||
},
|
||||
@@ -588,13 +588,13 @@ function init()
|
||||
|
||||
var element_list = $('.customized-' + element.parent().parent().find('.edit_product_id_order_detail').val());
|
||||
if (!element_list.length)
|
||||
element_list = element.parent().parent();
|
||||
element_list = element.parent().parent().parent();
|
||||
|
||||
element_list.css('background-color', '#E8EDC2');
|
||||
//element_list.css('background-color', '#E8EDC2');
|
||||
|
||||
element_list.find('td .product_price_show').hide();
|
||||
element_list.find('td .product_quantity_show').hide();
|
||||
element_list.find('td .product_price_edit').parent().attr('align', 'left');
|
||||
//element_list.find('td .product_price_edit').parent().attr('align', 'left');
|
||||
element_list.find('td .product_price_edit').show();
|
||||
element_list.find('td .product_quantity_edit').show();
|
||||
|
||||
@@ -607,10 +607,11 @@ function init()
|
||||
$('th.edit_product_fields').attr('colspan', 2);
|
||||
element_list.find('td.product_action').attr('colspan', 1);
|
||||
|
||||
element.parent().children('.delete_product_line').hide();
|
||||
element.parent().children('.edit_product_change_link').hide();
|
||||
element.parent().children('input[name=submitProductChange]').show();
|
||||
element.parent().children('.cancel_product_change_link').show();
|
||||
//element.parent().children('.delete_product_line').hide();
|
||||
element.parent().children('.edit_product_change_link').parent().hide();
|
||||
|
||||
element.parent().parent().find('button.submitProductChange').show();
|
||||
element.parent().parent().find('.cancel_product_change_link').show();
|
||||
|
||||
$('.standard_refund_fields').hide();
|
||||
$('.partial_refund_fields').hide();
|
||||
@@ -631,11 +632,10 @@ function init()
|
||||
if (!element_list.length)
|
||||
element_list = $($(this).parent().parent());
|
||||
|
||||
element_list.css('background-color', '#FFF');
|
||||
|
||||
//element_list.css('background-color', '#FFF');
|
||||
element_list.find('td .product_price_show').show();
|
||||
element_list.find('td .product_quantity_show').show();
|
||||
element_list.find('td .product_price_edit').parent().attr('align', 'center');
|
||||
//element_list.find('td .product_price_edit').parent().attr('align', 'center');
|
||||
element_list.find('td .product_price_edit').hide();
|
||||
element_list.find('td .product_quantity_edit').hide();
|
||||
|
||||
@@ -643,36 +643,35 @@ function init()
|
||||
element_list.find('td.cancelCheck').show();
|
||||
element_list.find('td.cancelQuantity').show();
|
||||
|
||||
element_list.find('.delete_product_line').show();
|
||||
element_list.find('.edit_product_change_link').show();
|
||||
element_list.find('input[name=submitProductChange]').hide();
|
||||
//element_list.find('.delete_product_line').show();
|
||||
element_list.find('.edit_product_change_link').parent().show();
|
||||
element_list.find('button[name=submitProductChange]').hide();
|
||||
element_list.find('.cancel_product_change_link').hide();
|
||||
$('.standard_refund_fields').hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('input[name=submitProductChange]').unbind('click');
|
||||
$('input[name=submitProductChange]').click(function() {
|
||||
if ($(this).parent().parent().find('td .edit_product_quantity').val() <= 0)
|
||||
$('button.submitProductChange').unbind('click');
|
||||
$('button.submitProductChange').click(function(e) {
|
||||
e.preventDefault();
|
||||
//console.log($(this).closest('tr.product-line-row').find('td .edit_product_quantity').val());
|
||||
//console.log($(this).closest('tr.product-line-row').find('td .edit_product_price').val());
|
||||
//return false;
|
||||
if ($(this).closest('tr.product-line-row').find('td .edit_product_quantity').val() <= 0)
|
||||
{
|
||||
jAlert(txt_add_product_no_product_quantity);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($(this).parent().parent().find('td .edit_product_price').val() <= 0)
|
||||
if ($(this).closest('tr.product-line-row').find('td .edit_product_price').val() <= 0)
|
||||
{
|
||||
jAlert(txt_add_product_no_product_price);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (confirm(txt_confirm))
|
||||
{
|
||||
var element = $(this);
|
||||
|
||||
var element_list = $('.customized-' + $(this).parent().parent().find('.edit_product_id_order_detail').val());
|
||||
|
||||
query = 'ajax=1&token='+token+'&action=editProductOnOrder&id_order='+id_order+'&';
|
||||
|
||||
if (element_list.length)
|
||||
query += element_list.parent().parent().find('input:visible, select:visible, .edit_product_id_order_detail').serialize();
|
||||
else
|
||||
@@ -717,10 +716,8 @@ function init()
|
||||
var price_tax_excl = parseFloat($(this).val());
|
||||
if (price_tax_excl < 0 || isNaN(price_tax_excl))
|
||||
price_tax_excl = 0;
|
||||
|
||||
var tax_rate = current_product.tax_rate / 100 + 1;
|
||||
$('.edit_product_price_tax_incl:visible').val(ps_round(price_tax_excl * tax_rate, 2));
|
||||
|
||||
// Update total product
|
||||
editProductRefreshTotal($(this));
|
||||
});
|
||||
@@ -733,7 +730,6 @@ function init()
|
||||
|
||||
var tax_rate = current_product.tax_rate / 100 + 1;
|
||||
$('.edit_product_price_tax_excl:visible').val(ps_round(price_tax_incl / tax_rate, 2));
|
||||
|
||||
// Update total product
|
||||
editProductRefreshTotal($(this));
|
||||
});
|
||||
@@ -743,7 +739,6 @@ function init()
|
||||
var quantity = parseInt($(this).val());
|
||||
if (quantity < 1 || isNaN(quantity))
|
||||
quantity = 1;
|
||||
|
||||
var stock_available = parseInt($(this).parent().parent().parent().find('td.product_stock').html());
|
||||
// total update
|
||||
editProductRefreshTotal($(this));
|
||||
@@ -753,9 +748,8 @@ function init()
|
||||
$('.delete_product_line').click(function() {
|
||||
if (!confirm(txt_confirm))
|
||||
return false;
|
||||
|
||||
var tr_product = $(this).parent().parent();
|
||||
var id_order_detail = $(this).parent().parent().find('td .edit_product_id_order_detail').val();
|
||||
var tr_product = $(this).closest('.product-line-row');
|
||||
var id_order_detail = $(this).closest('.product-line-row').find('td .edit_product_id_order_detail').val();
|
||||
var query = 'ajax=1&action=deleteProductLine&token='+token+'&id_order_detail='+id_order_detail+'&id_order='+id_order;
|
||||
|
||||
$.ajax({
|
||||
@@ -856,10 +850,6 @@ function init()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Refund system script */
|
||||
var flagRefund = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user