Skip to content

Commit

Permalink
Merge branch 'develop' into gli-1924
Browse files Browse the repository at this point in the history
  • Loading branch information
shreesh-webkul committed Aug 12, 2024
2 parents efa04cf + 023ad83 commit 8f102c7
Show file tree
Hide file tree
Showing 99 changed files with 414 additions and 5,162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{if isset($next_thread) && $next_thread}
<a class="btn btn-default pull-right" href="{$next_thread.href|escape:'html':'UTF-8'}">
{$next_thread.name} <i class="icon-forward"></i>
</a>
</a>
{/if}
</div>
<div class="well">
Expand Down Expand Up @@ -71,7 +71,7 @@
<div class="col-sm-6">
<p>
{if $count_ok}
{l s='[1]%1$d[/1] order(s) validated for a total amount of [2]%2$s[/2]' sprintf=[$count_ok, $total_ok] tags=['<span class="badge">', '<span class="badge badge-success">']}
{l s='[1]%1$d[/1] order(s) validated, total amount paid [2]%2$s[/2]' sprintf=[$count_ok, $total_ok] tags=['<span class="badge">', '<span class="badge badge-success">']}
{else}
{l s="No orders validated for the moment"}
{/if}
Expand Down Expand Up @@ -115,7 +115,7 @@
<i class="icon-magic icon-2x"></i><br>
{l s="Choose a template"}
</button>
-->
-->
<button class="btn btn-default pull-right" name="submitReply"><i class="process-icon-mail-reply"></i> {l s="Send"}</button>
<input type="hidden" name="id_customer_thread" value="{$thread->id|intval}" />
<input type="hidden" name="msg_email" value="{$thread->email}" />
Expand Down Expand Up @@ -159,7 +159,7 @@
});
timer = setInterval("markAsRead()", 3000);
});
function markAsRead()
{
$.ajax({
Expand Down
303 changes: 200 additions & 103 deletions admin/themes/default/template/controllers/customers/helpers/view/view.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -197,85 +197,122 @@
{if $orders AND count($orders)}
{assign var=count_ok value=count($orders_ok)}
{assign var=count_ko value=count($orders_ko)}
<div class="panel">
<div class="row">
<div class="col-lg-6">
<i class="icon-ok-circle icon-big"></i>
{l s='Valid orders:'}
<span class="label label-success">{$count_ok}</span>
{l s='for a total amount of %s' sprintf=$total_ok}
</div>
<div class="col-lg-6">
<i class="icon-exclamation-sign icon-big"></i>
{l s='Invalid orders:'}
<span class="label label-danger">{$count_ko}</span>
{if $count_ok || $count_ko}
<div class="nav nav-tabs">
<ul class="nav nav-tabs">
<li {if $count_ok}class="active"{/if}>
<a data-toggle="tab" href="#valid_orders">
<i class="icon-ok-circle icon-big"></i>
{l s='Valid orders:'}
<span class="label label-success">{$count_ok}</span>
</a>
</li>
<li {if !$count_ok && $count_ko}class="active"{/if}>
<a data-toggle="tab" href="#invalid_orders">
<i class="icon-exclamation-sign icon-big"></i>
{l s='Invalid orders:'}
<span class="label label-danger">{$count_ko}</span>
</a>
</li>
</ul>
<div class="tab-content panel">
<div class="tab-pane {if $count_ok}active{/if}" id="valid_orders">
<div class="row">
<div class="col-lg-5">
{l s='Total amount received: %s' sprintf=$total_ok}
</div>
</div>
<hr>
{if $count_ok}
<table class="table">
<thead>
<tr>
<th class="center"><span class="title_box ">{l s='ID'}</span></th>
<th><span class="title_box">{l s='Date'}</span></th>
<th><span class="title_box">{l s='Payment'}</span></th>
<th><span class="title_box">{l s='Status'}</span></th>
<th><span class="title_box">{l s='Products'}</span></th>
<th><span class="title_box ">{l s='Total spent'}</span></th>
<th></th>
</tr>
</thead>
<tbody>
{foreach $orders_ok AS $key => $order}
<tr onclick="document.location = '?tab=AdminOrders&amp;id_order={$order['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}'">
<td>{$order['id_order']}</td>
<td>{dateFormat date=$order['date_add'] full=0}</td>
<td>{$order['payment']}</td>
<td>{$order['order_state']}</td>
<td>{$order['nb_products']}</td>
<td>{$order['total_paid_real']}</td>
<td>
<a class="btn btn-default" href="?tab=AdminOrders&amp;id_order={$order['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}">
<i class='icon-search'></i> {l s='View'}
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
{else}
<p class="text-muted text-center">
{l s='No valid order found!!'}
</p>
{/if}
</div>

<div class="tab-pane {if !$count_ok && $count_ko}active{/if}" id="invalid_orders">
<div class="row">
<div class="col-lg-5">
{l s='Order total: %s' sprintf=$total_ko}
</div>
</div>
<hr>
{if $count_ko}
<table class="table">
<thead>
<tr>
<th><span class="title_box ">{l s='ID'}</span></th>
<th><span class="title_box ">{l s='Date'}</span></th>
<th><span class="title_box ">{l s='Payment'}</span></th>
<th><span class="title_box ">{l s='Status'}</span></th>
<th><span class="title_box ">{l s='Products'}</span></th>
<th><span class="title_box ">{l s='Total spent'}</span></th>
<th></th>
</tr>
</thead>
<tbody>
{foreach $orders_ko AS $key => $order}
<tr onclick="document.location = '?tab=AdminOrders&amp;id_order={$order['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}'">
<td>{$order['id_order']}</td>
<td>{dateFormat date=$order['date_add'] full=0}</a></td>
<td>{$order['payment']}</td>
<td>{$order['order_state']}</td>
<td>{$order['nb_products']}</td>
<td>{$order['total_paid_real']}</td>
<td>
<a class="btn btn-default" href="?tab=AdminOrders&amp;id_order={$order['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}">
<i class='icon-search'></i> {l s='View'}
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
{else}
<p class="text-muted text-center">
{l s='No invalid order found!!'}
</p>
{/if}
</div>
</div>
</div>
</div>

{if $count_ok}
<table class="table">
<thead>
<tr>
<th class="center"><span class="title_box ">{l s='ID'}</span></th>
<th><span class="title_box">{l s='Date'}</span></th>
<th><span class="title_box">{l s='Payment'}</span></th>
<th><span class="title_box">{l s='Status'}</span></th>
<th><span class="title_box">{l s='Products'}</span></th>
<th><span class="title_box ">{l s='Total spent'}</span></th>
<th></th>
</tr>
</thead>
<tbody>
{foreach $orders_ok AS $key => $order}
<tr onclick="document.location = '?tab=AdminOrders&amp;id_order={$order['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}'">
<td>{$order['id_order']}</td>
<td>{dateFormat date=$order['date_add'] full=0}</td>
<td>{$order['payment']}</td>
<td>{$order['order_state']}</td>
<td>{$order['nb_products']}</td>
<td>{$order['total_paid_real']}</td>
<td>
<a class="btn btn-default" href="?tab=AdminOrders&amp;id_order={$order['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}">
<i class='icon-search'></i> {l s='View'}
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}

{if $count_ko}
<table class="table">
<thead>
<tr>
<th><span class="title_box ">{l s='ID'}</span></th>
<th><span class="title_box ">{l s='Date'}</span></th>
<th><span class="title_box ">{l s='Payment'}</span></th>
<th><span class="title_box ">{l s='Status'}</span></th>
<th><span class="title_box ">{l s='Products'}</span></th>
<th><span class="title_box ">{l s='Total spent'}</span></th>
</tr>
</thead>
<tbody>
{foreach $orders_ko AS $key => $order}
<tr onclick="document.location = '?tab=AdminOrders&amp;id_order={$order['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}'">
<td>{$order['id_order']}</td>
<td><a href="?tab=AdminOrders&amp;id_order={$order['id_order']}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}">{dateFormat date=$order['date_add'] full=0}</a></td>
<td>{$order['payment']}</td>
<td>{$order['order_state']}</td>
<td>{$order['nb_products']}</td>
<td>{$order['total_paid_real']}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{else}
<p class="text-muted text-center">
{l s='%1$s %2$s has not placed any orders yet' sprintf=[$customer->firstname, $customer->lastname]}
</p>
<p class="text-muted text-center">
{l s='%1$s %2$s has not placed any orders yet' sprintf=[$customer->firstname, $customer->lastname]}
</p>
{/if}
</div>

Expand All @@ -289,7 +326,6 @@
<tr>
<th><span class="title_box ">{l s='ID'}</span></th>
<th><span class="title_box ">{l s='Date'}</span></th>
<th><span class="title_box ">{l s='Carrier'}</span></th>
<th><span class="title_box ">{l s='Total'}</span></th>
</tr>
</thead>
Expand All @@ -302,7 +338,6 @@
{dateFormat date=$cart['date_upd'] full=0}
</a>
</td>
<td>{$cart['name']}</td>
<td>{$cart['total_price']}</td>
</tr>
{/foreach}
Expand All @@ -315,33 +350,95 @@
{/if}
</div>
{if $products AND count($products)}
<div class="panel">
<div class="panel-heading">
<i class="icon-archive"></i> {l s='Purchased products'} <span class="badge">{count($products)}</span>
<div class="panel">
<div class="panel-heading">
<i class="icon-archive"></i> {l s='Room types and services'} <span class="badge">{count($products)}</span>
</div>
<div class="nav nav-tabs">
<ul class="nav nav-tabs">
{assign var=count_room_types value=count($purchasedRoomTypes)}
{assign var=count_services value=count($purchasedServices)}
{if $count_room_types}
<li class="active">
<a data-toggle="tab" href="#purchased_room_types">
{l s='Room Types'}
<span class="label label-success">{$count_room_types}</span>
</a>
</li>
{/if}
{if $count_services}
<li {if !$count_room_types} class="active" {/if}>
<a data-toggle="tab" href="#purchased_services">
{l s='Services:'}
<span class="label label-success">{$count_services}</span>
</a>
</li>
{/if}
</ul>
<div class="tab-content panel">
{if $count_room_types}
<div class="tab-pane active" id="purchased_room_types">
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='ID Order'}</span></th>
<th><span class="title_box">{l s='Name'}</span></th>
<th><span class="title_box">{l s='Nights booked'}</span></th>
<th><span class="title_box">{l s='Booking Date'}</span></th>
</tr>
</thead>
<tbody>
{foreach $purchasedRoomTypes AS $key => $product}
<tr onclick="document.location = '?tab=AdminOrders&amp;id_order={$product['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}'">
<td>
<a href="?tab=AdminOrders&amp;id_order={$product['id_order']}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}">
#{$product['id_order']}
</a>
</td>
<td>
{$product['product_name']}
</td>
<td>{$product['product_quantity']}</td>
<td>{dateFormat date=$product['date_add'] full=0}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
{if $count_services}
<div class="tab-pane {if !$count_room_types}active{/if}" id="purchased_services">
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='ID Order'}</span></th>
<th><span class="title_box">{l s='Name'}</span></th>
<th><span class="title_box">{l s='Quantity'}</span></th>
<th><span class="title_box">{l s='Booking Date'}</span></th>
</tr>
</thead>
<tbody>
{foreach $purchasedServices AS $key => $product}
<tr onclick="document.location = '?tab=AdminOrders&amp;id_order={$product['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}'">
<td>
<a href="?tab=AdminOrders&amp;id_order={$product['id_order']}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}">
#{$product['id_order']}
</a>
</td>
<td>
{$product['product_name']}
</td>
<td>{$product['product_quantity']}</td>
<td>{dateFormat date=$product['date_add'] full=0}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
</div>
</div>
</div>
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='Date'}</span></th>
<th><span class="title_box">{l s='Name'}</span></th>
<th><span class="title_box">{l s='Quantity'}</span></th>
</tr>
</thead>
<tbody>
{foreach $products AS $key => $product}
<tr onclick="document.location = '?tab=AdminOrders&amp;id_order={$product['id_order']|intval}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}'">
<td>{dateFormat date=$product['date_add'] full=0}</td>
<td>
<a href="?tab=AdminOrders&amp;id_order={$product['id_order']}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}">
{$product['product_name']}
</a>
</td>
<td>{$product['product_quantity']}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
{if count($interested)}
<div class="panel">
Expand Down Expand Up @@ -454,7 +551,7 @@
<a href="?tab=AdminCartRules&amp;id_cart_rule={$discount['id_cart_rule']|intval}&amp;addcart_rule&amp;token={getAdminToken tab='AdminCartRules'}&amp;back={$smarty.server.REQUEST_URI|urlencode}">
<i class="icon-pencil"></i>
</a>
<a href="?tab=AdminCartRules&amp;id_cart_rule={$discount['id_cart_rule']|intval}&amp;deletecart_rule&amp;token={getAdminToken tab='AdminCartRules'}&amp;back={$smarty.server.REQUEST_URI|urlencode}">
<a onclick="return confirm('{l s='Are you sure?'}')" href="?tab=AdminCartRules&amp;id_cart_rule={$discount['id_cart_rule']|intval}&amp;deletecart_rule&amp;token={getAdminToken tab='AdminCartRules'}&amp;back={$smarty.server.REQUEST_URI|urlencode}">
<i class="icon-remove"></i>
</a>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@

<dd><b><i class="icon-calendar"></i> &nbsp; {$customer->date_add|date_format:"%d %b, %Y"}</b> ({l s='Member since'})</dd>
<dd><b><i class="icon-list"></i> &nbsp; {$customerStats['nb_orders']|intval}</b> ({l s='Total valid order placed'})</dd>
<dd><b><i class="icon-credit-card"></i> &nbsp; {displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b> ({l s='Total spent since registration'})</dd>
<dd><b><i class="icon-credit-card"></i> &nbsp; {displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_spent'], $currency), 2) currency=$currency->id}</b> ({l s='Total spent since registration'})</dd>
{if Configuration::get('PS_B2B_ENABLE')}
<dd><b>{$customer->siret}</b> ({l s='Siret'})</dd>
<dd><b>{$customer->ape|date_format:"%d %b, %Y"}</b> ({l s='APE'})</dd>
Expand Down Expand Up @@ -1026,7 +1026,7 @@
</td>
{if $can_edit}
<td class="text-center">
<a class="btn btn-default" href="{$current_index}&amp;submitDeleteVoucher&amp;id_order_cart_rule={$discount['id_order_cart_rule']}&amp;id_order={$order->id}&amp;token={$smarty.get.token|escape:'html':'UTF-8'}"><i class="icon-trash"></i></a>
<a class="btn btn-default delete-voucher" href="{$current_index}&amp;submitDeleteVoucher&amp;id_order_cart_rule={$discount['id_order_cart_rule']}&amp;id_order={$order->id}&amp;token={$smarty.get.token|escape:'html':'UTF-8'}"><i class="icon-trash"></i></a>
</td>
{/if}
</tr>
Expand Down
Loading

0 comments on commit 8f102c7

Please sign in to comment.