Files
drmaterac.pl/modules/ets_promotion/views/templates/hook/rule_report.tpl
2025-01-06 20:47:25 +01:00

118 lines
7.6 KiB
Smarty

{*
* Copyright ETS Software Technology Co., Ltd
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 website only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future.
*
* @author ETS Software Technology Co., Ltd
* @copyright ETS Software Technology Co., Ltd
* @license Valid for 1 website (or project) for each purchase of license
*}
<div class="row">
<div class="col-lg-12">
<div class="row ets_pr_rule_report-row">
<h3 class="session-header">{l s='View discount report' mod='ets_promotion'}</h3>
<div class="session-body">
<div class="row">
<div class="card">
<div class="card-body">
<ul>
<li>
<span class="title">{l s='Rule name' mod='ets_promotion'}</span>
<span class="cotent"><a href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=ets_promotion&editrule=1&id_ets_pr_rule={$rule->id|intval}"> {$rule->name|escape:'html':'UTF-8'}</a> </span>
</li>
<li>
<span class="title">{l s='Discount code' mod='ets_promotion'}</span>
<span class="cotent">{if $rule->code}{$rule->code|escape:'html':'UTF-8'}{else}--{/if} </span>
</li>
<li>
<span class="title">{l s='Created date' mod='ets_promotion'}</span>
<span class="cotent">{$rule->date_add|escape:'html':'UTF-8'} </span>
</li>
{assign var='total_applied' value=$rule->getTotaldiscountApplied()}
{assign var='total_order_amount' value=$rule->getTotalOrderAmount()}
{if $total_applied >0}
<li>
<span class="title">{l s='Total discount applied' mod='ets_promotion'}</span>
<span class="cotent">{$rule->getTotaldiscountApplied()|escape:'html':'UTF-8'} </span>
</li>
{/if}
{if $rule->new_customer > 0}
<li>
<span class="title">{l s='Total new customers' mod='ets_promotion'}</span>
<span class="cotent">{$rule->new_customer|intval} </span>
</li>
{/if}
{if $total_order_amount>0}
<li>
<span class="title">{l s='Total order amount' mod='ets_promotion'}</span>
<span class="cotent">{displayPrice price=$rule->getTotalOrderAmount()} </span>
</li>
{/if}
</ul>
</div>
</div>
{if $applied_orders}
<div class="card ets_pr_list_applied_orders">
<h3 class="card-header">{l s='Order applied discount' mod='ets_promotion'}</h3>
<div class="card-body">
<table class="table">
<thead>
<tr>
<th>{l s='Order ID' mod='ets_promotion'}</th>
<th>{l s='Order reference' mod='ets_promotion'}</th>
<th>{l s='Customer' mod='ets_promotion'}</th>
<th>{l s='Products' mod='ets_promotion'}</th>
<th class="text-center">{l s='Original amount' mod='ets_promotion'}</th>
<th class="text-center">{l s='Paid amount' mod='ets_promotion'}</th>
<th class="text-center">{l s='Discount amount' mod='ets_promotion'}</th>
<th>{l s='Date added' mod='ets_promotion'}</th>
<th class="text-right">{l s='Action' mod='ets_promotion'}</th>
</tr>
</thead>
<tbody>
{foreach from= $applied_orders item='order'}
<tr>
<td>{$order.id_order|intval}</td>
<td><a href="{$order.link_view|escape:'html':'UTF-8'}">{$order.reference|escape:'html':'UTF-8'}</a></td>
<td><a href="{$order.view_customer|escape:'html':'UTF-8'}">{$order.firstname|escape:'html':'UTF-8'} {$order.lastname|escape:'html':'UTF-8'}</a><br /> {$order.email|escape:'html':'UTF-8'}</td>
<td>{$order.products nofilter}</td>
<td class="text-center">{displayPrice price= $order.total_onginal_paid}</td>
<td class="text-center">{displayPrice price= $order.total_paid}</td>
<td class="text-center">{displayPrice price= $order.value}</td>
<td>{dateFormat date=$order.date_add full=1}</td>
<td class="text-right">
<div class="btn-group-action">
<div class="btn-group pull-right">
<a class="btn btn-default link_view" href="{$order.link_view|escape:'html':'UTF-8'}">
<i class="icon-search-plus fa fa-search-plus"></i> {l s='View order' mod='ets_promotion'}
</a>
</div>
</div>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
{/if}
</div>
<div class="row">
<a class="btn btn-default back_to_list" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=ets_promotion&rule_tab=discount_report">
<i class="icon-arrow-left"></i>
{l s='Back to list' mod='ets_promotion'}
</a>
</div>
</div>
</div>
</div>
</div>