Improved order management in back-office
This commit is contained in:
@@ -160,6 +160,7 @@
|
||||
</span>
|
||||
</p>
|
||||
|
||||
{ifloop rel="address"}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
@@ -212,6 +213,13 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="address"}
|
||||
<div class="alert alert-info">
|
||||
{intl l="This customer has not defined any delivery address"}
|
||||
</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -28,22 +28,30 @@
|
||||
{loop type="order" name="the-order" id=$order_id customer="*"}
|
||||
|
||||
{loop type="currency" name="order-currency" id=$CURRENCY}
|
||||
{assign "orderCurrency" $SYMBOL}
|
||||
{$orderCurrency=$SYMBOL}
|
||||
{/loop}
|
||||
|
||||
{assign "orderStatusId" $STATUS}
|
||||
|
||||
<div class="lead clearfix">
|
||||
<span class='label label-default pull-left'>{$REF}</span>
|
||||
<div class="pull-right select-fixed-width">
|
||||
<form id="order-update-status-form" action="{url path="/admin/order/update/$ID/status"}" method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-7 title">
|
||||
{intl l='Order %ref' ref=$REF}
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 actions">
|
||||
<form class="form-horizontal" role="form" id="order-update-status-form" action="{url path="/admin/order/update/$ID/status"}" method="post">
|
||||
<input class="js-current-tab" type="hidden" name="tab" value="{$oder_tab}">
|
||||
<select class="js-update-order-status" name="status_id" data-toggle="selectpicker">
|
||||
{loop type="order-status" name="all-status"}
|
||||
{assign "orderStatusLabel" "order_$CODE"}
|
||||
<option {if $ID == $orderStatusId}selected="selected" {/if} value="{$ID}" data-content="<span class='label label-{#$orderStatusLabel#}'>{$TITLE}</span>">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-6 control-label">{intl l="Order status:"}</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="js-update-order-status" name="status_id" data-toggle="selectpicker">
|
||||
{loop type="order-status" name="all-status"}
|
||||
{assign "orderStatusLabel" "order_$CODE"}
|
||||
<option {if $ID == $orderStatusId}selected="selected" {/if} value="{$ID}" data-content="<span class='label label-{#$orderStatusLabel#}'>{$TITLE}</span>">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,16 +67,16 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Cart'}
|
||||
{intl l='Cart - Prices in %currency' currency=$orderCurrency}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-7">{intl l="Product"}</th>
|
||||
<th class="col-md-1">{intl l="Unit. price"}</th>
|
||||
<th class="col-md-1">{intl l="Tax"}</th>
|
||||
<th class="col-md-1">{intl l="Unit taxed price"}</th>
|
||||
<th class="col-md-1">{intl l="Quantity"}</th>
|
||||
<th class="col-md-1">{intl l="Taxed total"}</th>
|
||||
<th class="col-md-1 text-right">{intl l="Unit. price"}</th>
|
||||
<th class="col-md-1 text-right">{intl l="Tax"}</th>
|
||||
<th class="col-md-1 text-right">{intl l="Unit taxed price"}</th>
|
||||
<th class="col-md-1 text-right">{intl l="Quantity"}</th>
|
||||
<th class="col-md-1 text-right">{intl l="Taxed total"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -95,11 +103,11 @@
|
||||
</dl>
|
||||
{/ifloop}
|
||||
</td>
|
||||
<td>{$orderCurrency} {$realPrice}</td>
|
||||
<td>{$orderCurrency} {$realTax}</td>
|
||||
<td>{$orderCurrency} {$realTaxedPrice}</td>
|
||||
<td>{$QUANTITY}</td>
|
||||
<td>{$orderCurrency} {$realTaxedPrice * $QUANTITY}</td>
|
||||
<td class="text-right">{format_money number=$realPrice symbol=$orderCurrency}</td>
|
||||
<td class="text-right">{format_money number=$realTax symbol=$orderCurrency}</td>
|
||||
<td class="text-right">{format_money number=$realTaxedPrice symbol=$orderCurrency}</td>
|
||||
<td class="text-right">{$QUANTITY}</td>
|
||||
<td class="text-right">{format_money number=$realTaxedPrice * $QUANTITY symbol=$orderCurrency}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
@@ -107,17 +115,17 @@
|
||||
<tr class="active">
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Total without discount"}</strong></td>
|
||||
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
|
||||
<td class="text-right"><strong>{format_money number=$TOTAL_TAXED_AMOUNT-$POSTAGE symbol=$orderCurrency}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Discount"}</strong></td>
|
||||
<td><strong>{$orderCurrency} {$DISCOUNT}</strong></td>
|
||||
<td class="text-right"><strong>{format_money number=$DISCOUNT symbol=$orderCurrency}</strong></td>
|
||||
</tr>
|
||||
<tr class="active">
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Coupon code"}</strong></td>
|
||||
<td>
|
||||
<td class="text-right">
|
||||
{loop type="order_coupon" name="couponcode" order=$ID}
|
||||
{$CODE}{if $LOOP_COUNT != $LOOP_TOTAL}, {/if}
|
||||
{/loop}
|
||||
@@ -129,17 +137,17 @@
|
||||
<tr>
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Total including discount"}</strong></td>
|
||||
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
|
||||
<td class="text-right"><strong>{format_money number=$TOTAL_TAXED_AMOUNT-$POSTAGE symbol=$orderCurrency}</strong></td>
|
||||
</tr>
|
||||
<tr class="active">
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Postage"}</strong></td>
|
||||
<td><strong>{$orderCurrency} {$POSTAGE}</strong></td>
|
||||
<td class="text-right"><strong>{format_money number=$POSTAGE symbol=$orderCurrency}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3" class="last"><strong>{intl l="Total"}</strong></td>
|
||||
<td class="last"><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</strong></td>
|
||||
<td class="last text-right"><strong>{format_money number=$TOTAL_TAXED_AMOUNT symbol=$orderCurrency}</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -32,12 +32,57 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Order n°"}</th>
|
||||
<th>{intl l="Date & Hour"}</th>
|
||||
<th>{intl l="Company"}</th>
|
||||
<th>{intl l="Name"}</th>
|
||||
<th>{intl l="Amount"}</th>
|
||||
<th>{intl l="Status"}</th>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$orders_order
|
||||
order='reference'
|
||||
reverse_order='reference-reverse'
|
||||
path={url path='/admin/orders'}
|
||||
request_parameter_name='orders_order'
|
||||
label="{intl l='Order #'}"
|
||||
} </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$orders_order
|
||||
order='create-date'
|
||||
reverse_order='create-date-reverse'
|
||||
path={url path='/admin/orders'}
|
||||
request_parameter_name='orders_order'
|
||||
label="{intl l='Date & Hour'}"
|
||||
} </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$orders_order
|
||||
order='company'
|
||||
reverse_order='company-reverse'
|
||||
path={url path='/admin/orders'}
|
||||
request_parameter_name='orders_order'
|
||||
label="{intl l='Company'}"
|
||||
} </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$orders_order
|
||||
order='customer-name'
|
||||
reverse_order='customer-name-reverse'
|
||||
path={url path='/admin/orders'}
|
||||
request_parameter_name='orders_order'
|
||||
label="{intl l='Cutomer Name'}"
|
||||
} </th>
|
||||
|
||||
<th class="object-title text-right">{intl l='Amount'}</th>
|
||||
|
||||
<th class="object-title text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$orders_order
|
||||
order='status'
|
||||
reverse_order='status-reverse'
|
||||
path={url path='/admin/orders'}
|
||||
request_parameter_name='orders_order'
|
||||
label="{intl l='Status'}"
|
||||
} </th>
|
||||
|
||||
{module_include location='orders_table_header'}
|
||||
|
||||
@@ -47,7 +92,11 @@
|
||||
|
||||
<tbody>
|
||||
|
||||
{loop type="order" name="order-list" customer="*" backend_context="1" page={$order_page} limit={#max_displayed_orders#} status=$status_filter|default:'*'}
|
||||
{loop type="order" name="order-list" customer="*" order=$orders_order backend_context="1" page={$order_page} limit={#max_displayed_orders#} status=$status_filter|default:'*'}
|
||||
|
||||
{loop type="currency" name="order-currency" id=$CURRENCY}
|
||||
{$orderCurrency=$SYMBOL}
|
||||
{/loop}
|
||||
|
||||
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
|
||||
{assign "orderInvoiceFirstName" $FIRSTNAME}
|
||||
@@ -66,8 +115,8 @@
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{$orderInvoiceCompany}</td>
|
||||
<td><a href="{url path='/admin/customer/update' customer_id=$CUSTOMER}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td>{$TOTAL_TAXED_AMOUNT}</td>
|
||||
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
|
||||
<td class="text-right">{format_money number=$TOTAL_TAXED_AMOUNT symbol=$orderCurrency}</td>
|
||||
<td class="text-center"><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
|
||||
|
||||
{module_include location='orders_table_row'}
|
||||
|
||||
@@ -94,14 +143,14 @@
|
||||
<div class="text-center">
|
||||
<ul class="pagination pagination-centered">
|
||||
{if $order_page != 1}
|
||||
<li><a href="{url path="/admin/orders" page="1"}">«</a></li>
|
||||
<li><a href="{url path="/admin/orders" page=1 orders_order=$orders_order}">«</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
{/if}
|
||||
|
||||
{pageloop rel="order-list"}
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path="/admin/orders" page=$PAGE}">{$PAGE}</a></li>
|
||||
<li><a href="{url path="/admin/orders" page=$PAGE orders_order=$orders_order}">{$PAGE}</a></li>
|
||||
|
||||
{else}
|
||||
<li class="active"><a href="#">{$PAGE}</a></li>
|
||||
@@ -110,7 +159,7 @@
|
||||
|
||||
{/pageloop}
|
||||
{if $PAGE == $LAST && $LAST != $CURRENT}
|
||||
<li><a href="{url path="/admin/orders" page="$PAGE"}">»</a></li>
|
||||
<li><a href="{url path="/admin/orders" page=$PAGE orders_order=$orders_order}">»</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">»</a></li>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user