fix conflict css

This commit is contained in:
Marion Muszynski 2016-04-21 17:44:16 +02:00
commit d3f7d66f95
11 changed files with 107 additions and 56 deletions

View File

@ -133,13 +133,14 @@ class LoyaltyModule extends ObjectModel
public static function getVoucherValueByPercentOfOrder($orders, $id_currency = NULL)
{
global $cookie;
if (empty($id_currency))
$id_currency = (int)$cookie->id_currency;
$value = 0;
foreach ($orders as $key => $order) {
$value += $order['discount_value'];
if ($orders && !empty($orders)) {
foreach ($orders as $key => $order) {
$value += $order['discount_value'];
}
}
return (float)Tools::convertPrice($value, new Currency((int)$id_currency));
@ -192,12 +193,14 @@ class LoyaltyModule extends ObjectModel
return Db::getInstance()->ExecuteS($query);
}
public static function getAllByIdCustomerCustom($id_customer, $id_lang, $onlyValidate = false, $pagination = false, $nb = 10, $page = 1, $percent = 1.75)
public static function getAllByIdCustomerCustom($id_customer, $id_lang, $onlyValidate = false, $pagination = false, $nb = 10, $page = 1, $onlyDefault = false)
{
$percent = (float)(1.75 / 100);
$query = '
SELECT f.id_order AS id, f.date_add AS date,
(o.total_paid - o.total_shipping) total_without_shipping,
(('.$percent.' * (o.total_paid - o.total_shipping)) / 100) as reduc_value,
(('.(float)$percent.' * (o.total_paid - o.total_shipping))) as reduc_value,
f.discount_value, f.id_loyalty, f.id_loyalty_state, fsl.name state
FROM `'._DB_PREFIX_.'loyalty` f
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (f.id_order = o.id_order)
@ -206,6 +209,8 @@ class LoyaltyModule extends ObjectModel
AND f.id_loyalty_state != '.(int)LoyaltyStateModule::getCancelId();
if ($onlyValidate) {
$query .= ' AND f.id_loyalty_state = '.(int)LoyaltyStateModule::getValidationId();
} elseif ($onlyDefault){
$query .= ' AND f.id_loyalty_state = '.(int)LoyaltyStateModule::getDefaultId();
}
$query .= ' GROUP BY f.id_loyalty '.
($pagination ? 'LIMIT '.(((int)($page) - 1) * (int)($nb)).', '.(int)($nb) : '');
@ -238,11 +243,12 @@ class LoyaltyModule extends ObjectModel
{
$f = new LoyaltyModule((int)$item['id_loyalty']);
if ($f->discount_value = 0) {
if ($f->discount_value == 0) {
continue;
}
$f->id_discount = (int)$discount->id;
$f->discount_value = $f->discount_value;
$f->id_loyalty_state = (int)LoyaltyStateModule::getConvertId();
$f->save();
}
@ -274,10 +280,10 @@ class LoyaltyModule extends ObjectModel
public static function getOrdersByIdDiscountCustom($id_discount)
{
$items = Db::getInstance()->ExecuteS('
SELECT f.id_order AS id_order, f.discount_value, f.date_upd AS date,
FROM `'._DB_PREFIX_.'loyalty` f
WHERE f.id_discount = '.(int)($id_discount).' AND f.id_loyalty_state = '.(int)(LoyaltyStateModule::getConvertId()));
SELECT f.id_order AS id_order, f.discount_value, f.date_upd AS date
FROM `'._DB_PREFIX_.'loyalty` f
WHERE f.id_discount = '.(int)($id_discount).' AND f.id_loyalty_state = '.(int)(LoyaltyStateModule::getConvertId())
);
if (!empty($items) AND is_array($items))
{
foreach ($items AS $key => $item)
@ -287,6 +293,7 @@ class LoyaltyModule extends ObjectModel
$items[$key]['id_lang'] = (int)$order->id_lang;
$items[$key]['total_paid'] = $order->total_paid;
$items[$key]['total_shipping'] = $order->total_shipping;
$items[$key]['discount_value'] = $item['discount_value'];
}
return $items;
}

View File

@ -41,8 +41,9 @@ Tools::addCSS(_PS_CSS_DIR_.'jquery.cluetip.css', 'all');
Tools::addJS(array(_PS_JS_DIR_.'jquery/jquery.dimensions.js',_PS_JS_DIR_.'jquery/jquery.cluetip.js'));
$displayorders = LoyaltyModule::getAllByIdCustomerCustom((int)($cookie->id_customer), (int)($cookie->id_lang), false, true, ((int)(Tools::getValue('n')) > 0 ? (int)(Tools::getValue('n')) : 10), ((int)(Tools::getValue('p')) > 0 ? (int)(Tools::getValue('p')) : 1));
$orderToConvert = LoyaltyModule::getAllByIdCustomerCustom((int)($cookie->id_customer), (int)($cookie->id_lang), false, false, $nb = 10, $page = 1, true);
$orderToConvert = LoyaltyModule::getAllByIdCustomerCustom((int)($cookie->id_customer), (int)($cookie->id_lang), true, false, $nb = 10, $page = 1);
$total_discount = LoyaltyModule::getVoucherValueByPercentOfOrder($orderToConvert, (int)($cookie->id_currency));
/* transform point into voucher if needed */
if (Tools::getValue('transform-points') == 'true' AND $total_discount > 0)
{
@ -112,10 +113,10 @@ if (Tools::getValue('transform-points') == 'true' AND $total_discount > 0)
include(dirname(__FILE__).'/../../header.php');
$orders = LoyaltyModule::getAllByIdCustomer((int)($cookie->id_customer), (int)($cookie->id_lang));
//$orders = LoyaltyModule::getAllByIdCustomer((int)($cookie->id_customer), (int)($cookie->id_lang));
$smarty->assign(array(
'orders' => $orders,
//'orders' => $orders,
'displayorders' => $displayorders,
'pagination_link' => __PS_BASE_URI__.'modules/loyalty/loyalty-program.php',
'voucher' => $total_discount,
@ -136,7 +137,7 @@ if ($ids_discount = LoyaltyModule::getDiscountByIdCustomer((int)($cookie->id_cus
foreach ($ids_discount AS $key => $discount)
{
$discounts[$key] = new Discount((int)$discount['id_discount'], (int)($cookie->id_lang));
$discounts[$key]->orders = LoyaltyModule::getOrdersByIdDiscount((int)$discount['id_discount']);
$discounts[$key]->orders = LoyaltyModule::getOrdersByIdDiscountCustom((int)$discounts[$key]->id);
}
}
@ -159,12 +160,13 @@ else
$categoriesNames = Tools::truncate(implode(', ', $categoriesNames), 100).'.';
else
$categoriesNames = null;
}
}
$smarty->assign(array(
'nbDiscounts' => (int)$nbDiscounts,
'discounts' => $discounts,
'minimalLoyalty' => (float)Configuration::get('PS_LOYALTY_MINIMAL'),
'categories' => $categoriesNames));
'categories' => $categoriesNames
));
echo Module::display(dirname(__FILE__).'/loyalty.php', 'loyalty.tpl');

View File

@ -616,7 +616,8 @@ class Loyalty extends Module
die(Tools::displayError('Incorrect object Customer.'));
$details = LoyaltyModule::getAllByIdCustomer((int)$params['id_customer'], (int)$params['cookie']->id_lang);
$discount_value = LoyaltyModule::getVoucherValueByPercentOfOrder($details);
$valid_orders = LoyaltyModule::getAllByIdCustomerCustom((int)$params['id_customer'], (int)$params['cookie']->id_lang, false, false, $nb = 10, $page = 1, true);
$discount_value = LoyaltyModule::getVoucherValueByPercentOfOrder($valid_orders, (int)Configuration::get('PS_CURRENCY_DEFAULT'));
$html = '
<br /><h2>'.$this->l('Loyalty progam').' ('.Tools::displayPrice($discount_value, (int)Configuration::get('PS_CURRENCY_DEFAULT')).')</h2>';
@ -640,17 +641,18 @@ class Loyalty extends Module
<tr style="background-color: '.($key % 2 != 0 ? '#FFF6CF' : '#FFFFFF').';">
<td>'.((int)$loyalty['id'] > 0 ? '<a style="color: #268CCD; font-weight: bold; text-decoration: underline;" href="index.php?tab=AdminOrders&id_order='.$loyalty['id'].'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($params['cookie']->id_employee)).'">'.$this->l('#').sprintf('%06d', $loyalty['id']).'</a>' : '--').'</td>
<td>'.Tools::displayDate($loyalty['date'], (int)($params['cookie']->id_lang)).'</td>
<td>'.((int)$loyalty['id'] > 0 ? $loyalty['total_without_shipping'] : '--').'</td>
<td>'.(int)$loyalty['discount_value'].'</td>
<td>'.((int)$loyalty['id'] > 0 ? Tools::displayPrice($loyalty['total_without_shipping'],(int)Configuration::get('PS_CURRENCY_DEFAULT')) : '--').'</td>
<td>'.Tools::displayPrice((float)$loyalty['discount_value'],(int)Configuration::get('PS_CURRENCY_DEFAULT')).'</td>
<td>'.$loyalty['state'].'</td>
</tr>';
}
$html.= '
<tr>
<td>&nbsp;</td>
<td colspan="2" class="bold" style="text-align: right;">'.$this->l('Total discounts available:').'</td>
<td>&nbsp;</td>
<td>'.$this->l('Voucher value:').' '.Tools::displayPrice(LoyaltyModule::getVoucherValueByPercentOfOrder($details, (int)Configuration::get('PS_CURRENCY_DEFAULT')), new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT'))).'</td>
<td>'.$this->l('Voucher value:').'</td>
<td>'.Tools::displayPrice(LoyaltyModule::getVoucherValueByPercentOfOrder($details, (int)Configuration::get('PS_CURRENCY_DEFAULT')), new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT'))).'</td>
<td>&nbsp;</td>
</tr>
</table>';

View File

@ -1,7 +1,8 @@
<?php
class Discount extends DiscountCore
{
public $orders;
public static function createOrderDiscount($order, $productList, $qtyList, $name, $shipping_cost = false, $id_category = 0, $subcategory = 0)
{
$languages = Language::getLanguages($order);

View File

@ -5725,6 +5725,27 @@ div#giftvoucher_ask_infos_block .gv_customization > .gv_param input {
float: left;
}
/** Module loyalty **/
a.loyalty-transform, .history_method span.total-discount-loyalty{
text-align: center;
text-transform: none;
border: 0px;
color: #FFF;
font-size: 12px;
padding: 8px 20px 8px 20px;
text-decoration: none;
font-weight: normal;
/* background: #504d8b url("../img/arrow.png") right 9px no-repeat; */
background: #504d8b;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
font-family: georgia, times new roman, serif;
font-style: italic;
font-size: 13px;
}
@keyframes slideInDown {
0% {
-webkit-transform: translateY(-500px);

View File

@ -49,7 +49,7 @@
<li class="logout">
<a href="{$link->getPageLink('index.php')}?mylogout" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'}</a>
</li>
</ul>
</ul>
</li>
</ul>
</div>

View File

@ -3,9 +3,9 @@
<h1 class="loyalty_title">{l s='My loyalty points' mod='loyalty'}</h1>
{if $orders}
{if $displayorders}
<div class="block-center" id="block-history">
{if $orders && count($orders)}
{if $displayorders && count($displayorders)}
<table id="order-list" class="std">
<thead>
<tr>
@ -19,8 +19,8 @@
<tfoot>
<tr class="alternate_item">
<td class="history_method">&nbsp;</td>
<td colspan="2" class="history_method bold" style="text-align:center;">{l s='Total discount available:' mod='loyalty'}</td>
<td class="history_method" style="text-align:left;">{Tools::displayPrice($voucher)}</td>
<td colspan="2" class="history_method bold" style="text-align:right;">{l s='Total discount available:' mod='loyalty'}</td>
<td class="history_method" style="text-align:left;"><span class='total-discount-loyalty'>{Tools::displayPrice($voucher)}</span></td>
<td class="history_method">&nbsp;</td>
</tr>
</tfoot>
@ -45,7 +45,7 @@
{/if}
</div>
<div id="pagination" class="pagination">
{if $nbpagination < $orders|@count}
{if $nbpagination < $displayorders|@count}
<ul class="pagination">
{if $page != 1}
{assign var='p_previous' value=$page-1}
@ -73,7 +73,7 @@
{/if}
<li><a href="{$pagination_link}?p={$max_page}&n={$nbpagination}">{$max_page}</a></li>
{/if}
{if $orders|@count > $page * $nbpagination}
{if $displayorders|@count > $page * $nbpagination}
{assign var='p_next' value=$page+1}
<li id="pagination_next"><a href="{$pagination_link}?p={$p_next}&n={$nbpagination}">{l s='Next' mod='loyalty'}&nbsp;&raquo;</a></li>
{else}
@ -81,14 +81,14 @@
{/if}
</ul>
{/if}
{if $orders|@count > 10}
{if $displayorders|@count > 10}
<form action="{$pagination_link}" method="get" class="pagination">
<p>
<input type="submit" class="button_mini" value="{l s='OK'}" />
<label for="nb_item">{l s='items:' mod='loyalty'}</label>
<select name="n" id="nb_item">
{foreach from=$nArray item=nValue}
{if $nValue <= $orders|@count}
{if $nValue <= $displayorders|@count}
<option value="{$nValue|escape:'htmlall':'UTF-8'}" {if $nbpagination == $nValue}selected="selected"{/if}>{$nValue|escape:'htmlall':'UTF-8'}</option>
{/if}
{/foreach}
@ -102,7 +102,7 @@
{if $transformation_allowed}
<p style="text-align:center; margin-top:20px">
<a href="{$base_dir}modules/loyalty/loyalty-program.php?transform-points=true" onclick="return confirm('{l s='Are you sure you want to transform your discounts into vouchers?' mod='loyalty' js=1}');">{l s='Transform my discounts into a voucher of' mod='loyalty'} <span class="price">{convertPrice price=$voucher}</span>.</a>
<a class="exclusive loyalty-transform" href="{$base_dir}modules/loyalty/loyalty-program.php?transform-points=true" onclick="return confirm('{l s='Are you sure you want to transform your discounts into vouchers?' mod='loyalty' js=1}');">{l s='Transform my discounts into a voucher of' mod='loyalty'} <span class="price">{convertPrice price=$voucher}</span>.</a>
</p>
{/if}
@ -138,7 +138,7 @@
<td class="history_date">{dateFormat date=$discount->date_from}</td>
<td class="history_date">{dateFormat date=$discount->date_to}</td>
<td class="history_method bold">{if $discount->quantity > 0}{l s='To use' mod='loyalty'}{else}{l s='Used' mod='loyalty'}{/if}</td>
<td class="history_method"><a href="{$smarty.server.SCRIPT_NAME}" onclick="return false" class="tips" title="{l s='Generated by these following orders' mod='loyalty'}|{foreach from=$discount->orders item=myorder name=myLoop}{l s='Order #' mod='loyalty'}{$myorder.id_order} ({displayPrice price=$myorder.total_paid currency=$myorder.id_currency}) : {if $myorder.total_reduct > 0}{$myorder.total_reduct} {else}{l s='Cancelled' mod='loyalty'}{/if}{if !$smarty.foreach.myLoop.last}|{/if}{/foreach}">{l s='more...' mod='loyalty'}</a></td>
<td class="history_method"><a href="{$smarty.server.SCRIPT_NAME}" onclick="return false" class="tips" title="{l s='Generated by these following orders' mod='loyalty'}|{foreach from=$discount->orders item=myorder name=myLoop}{l s='Order #' mod='loyalty'}{$myorder.id_order} ({displayPrice price=$myorder.total_paid currency=$myorder.id_currency}) : {if $myorder.discount_value > 0}{displayPrice price=$myorder.discount_value currency=$myorder.id_currency} {else}{l s='Cancelled' mod='loyalty'}{/if}{if !$smarty.foreach.myLoop.last}|{/if}{/foreach}">{l s='more...' mod='loyalty'}</a></td>
</tr>
{/foreach}
</tbody>
@ -169,6 +169,12 @@ $(document).ready(function()
{/if}
{else}
<p class="error">{l s='No reward discounts yet.' mod='loyalty'}</p>
<p class="footer_links"><a href="{$base_dir_ssl}" title="{l s='Home' mod='loyalty'}" class="button">{l s='Home' mod='loyalty'}</a></p>
{/if}
<br />
<p class="footer_links">
<a class="back_account" href="{$link->getPageLink('my-account.php', true)}" class="button">
<i class="icon-user"></i><span>{l s='Back to my account' mod='loyalty'}</span>
</a>
</p>

View File

@ -4465,5 +4465,15 @@ body#index .jqibuttons span.gradient{
background: #504d8b;
}
#cookiescontent { padding: 10px; font-size: 12px; }
/** Module loyalty **/
.exclusive.loyalty-transform {
background: #504c89;
color: #fff;
font-size: 12px;
font-weight: bold;
height: 20px;
line-height: 25px;
padding: 10px;
}

View File

@ -29,31 +29,34 @@
<h1 class="title"><span>{l s='My loyalty points' mod='loyalty'}</span></h1>
{if $orders}
<div class="block-center loyalty_table" id="block-history">
{if $orders && count($orders)}
{if $displayorders}
<div class="block-center" id="block-history">
{if $displayorders && count($displayorders)}
<table id="order-list" class="std">
<thead>
<tr>
<th class="first_item">{l s='Order' mod='loyalty'}</th>
<th class="item">{l s='Date' mod='loyalty'}</th>
<th class="item">{l s='Points' mod='loyalty'}</th>
<th class="item">{l s='Discount' mod='loyalty'}</th>
<th class="last_item">{l s='Points Status' mod='loyalty'}</th>
</tr>
</thead>
<tfoot>
<tr class="alternate_item">
<td colspan="2" class="history_method bold" style="text-align:center;">{l s='Total points available:' mod='loyalty'}</td>
<td class="history_method" style="text-align:left;">{$totalPoints|intval}</td>
<td colspan="2" class="history_method bold" style="text-align:right;">{l s='Total discount available:' mod='loyalty'}</td>
<td class="history_method" style="text-align:left;"><span class='total-discount-loyalty'>{Tools::displayPrice($voucher)}</span></td>
<td class="history_method">&nbsp;</td>
</tr>
</tfoot>
<tbody>
{foreach from=$displayorders item='order'}
{if $order.id_loyalty_state == 3}
{continue}
{/if}
<tr class="alternate_item">
<td class="history_link bold">{l s='#' mod='loyalty'}{$order.id|string_format:"%06d"}</td>
<td class="history_date">{dateFormat date=$order.date full=1}</td>
<td class="history_method">{$order.points|intval}</td>
<td class="history_date">{dateFormat date=$order.date}</td>
<td class="history_method">{Tools::displayPrice($order.reduc_value)}</td>
<td class="history_method">{$order.state|escape:'htmlall':'UTF-8'}</td>
</tr>
{/foreach}
@ -65,7 +68,7 @@
{/if}
</div>
<div id="pagination" class="pagination">
{if $nbpagination < $orders|@count}
{if $nbpagination < $displayorders|@count}
<ul class="pagination">
{if $page != 1}
{assign var='p_previous' value=$page-1}
@ -93,7 +96,7 @@
{/if}
<li><a href="{$pagination_link}?p={$max_page}&n={$nbpagination}">{$max_page}</a></li>
{/if}
{if $orders|@count > $page * $nbpagination}
{if $displayorders|@count > $page * $nbpagination}
{assign var='p_next' value=$page+1}
<li id="pagination_next"><a href="{$pagination_link}?p={$p_next}&n={$nbpagination}">{l s='Next' mod='loyalty'}&nbsp;&raquo;</a></li>
{else}
@ -101,14 +104,14 @@
{/if}
</ul>
{/if}
{if $orders|@count > 10}
{if $displayorders|@count > 10}
<form action="{$pagination_link}" method="get" class="pagination">
<p>
<input type="submit" class="button_mini" value="{l s='OK'}" />
<label for="nb_item">{l s='items:' mod='loyalty'}</label>
<select name="n" id="nb_item">
{foreach from=$nArray item=nValue}
{if $nValue <= $orders|@count}
{if $nValue <= $displayorders|@count}
<option value="{$nValue|escape:'htmlall':'UTF-8'}" {if $nbpagination == $nValue}selected="selected"{/if}>{$nValue|escape:'htmlall':'UTF-8'}</option>
{/if}
{/foreach}
@ -124,7 +127,7 @@
{if $transformation_allowed}
<p style="text-align:center; margin-top:20px">
<a href="{$base_dir}modules/loyalty/loyalty-program.php?transform-points=true" onclick="return confirm('{l s='Are you sure you want to transform your points into vouchers?' mod='loyalty' js=1}');">{l s='Transform my points into a voucher of' mod='loyalty'} <span class="price">{convertPrice price=$voucher}</span>.</a>
<a class="exclusive loyalty-transform" href="{$base_dir}modules/loyalty/loyalty-program.php?transform-points=true" onclick="return confirm('{l s='Are you sure you want to transform your discounts into vouchers?' mod='loyalty' js=1}');">{l s='Transform into voucher of' mod='loyalty'} <span class="price">{convertPrice price=$voucher}</span>.</a>
</p>
{/if}
@ -161,7 +164,7 @@
<br />{dateFormat date=$discount->date_to}
</td>
<td class="history_method bold">{if $discount->quantity > 0}{l s='To use' mod='loyalty'}{else}{l s='Used' mod='loyalty'}{/if}</td>
<td class="history_method"><a href="{$smarty.server.SCRIPT_NAME}" onclick="return false" class="tips" title="{l s='Generated by these following orders' mod='loyalty'}|{foreach from=$discount->orders item=myorder name=myLoop}{l s='Order #' mod='loyalty'}{$myorder.id_order} ({displayPrice price=$myorder.total_paid currency=$myorder.id_currency}) : {if $myorder.points > 0}{$myorder.points} {l s='points.' mod='loyalty'}{else}{l s='Cancelled' mod='loyalty'}{/if}{if !$smarty.foreach.myLoop.last}|{/if}{/foreach}">{l s='more...' mod='loyalty'}</a></td>
<td class="history_method"><a href="{$smarty.server.SCRIPT_NAME}" onclick="return false" class="tips" title="{l s='Generated by these following orders' mod='loyalty'}|{foreach from=$discount->orders item=myorder name=myLoop}{l s='Order #' mod='loyalty'}{$myorder.id_order} ({displayPrice price=$myorder.total_paid currency=$myorder.id_currency}) : {if $myorder.discount_value > 0}{displayPrice price=$myorder.discount_value currency=$myorder.id_currency}{else}{l s='Cancelled' mod='loyalty'}{/if}{if !$smarty.foreach.myLoop.last}|{/if}{/foreach}">{l s='more...' mod='loyalty'}</a></td>
</tr>
{/foreach}
</tbody>
@ -194,10 +197,9 @@ $(document).ready(function()
<p class="warning">{l s='No reward points yet.' mod='loyalty'}</p>
{/if}
<br />
<p class="footer_links">
<p class="footer_links" style="text-align:center;">
<a class="back_account" href="{$link->getPageLink('my-account.php', true)}" class="button">
<i class="icon-user"></i><span>{l s='Back to my account' mod='loyalty'}</span>
</a>

View File

@ -25,14 +25,14 @@
*}
<p id="loyalty" class="align_justify">
{if $points}
{if $discountValue}
<img src="/img/loyalty.jpg" alt="Loyalty program" class="icon">
<span id="loyalty_price">{l s='Loyalty points' mod='loyalty'} {convertPrice price=$voucher}</span>
<span id="loyalty_price">{l s='Loyalty points' mod='loyalty'} {convertPrice price=$discountValue}</span>
{else}
{if isset($no_pts_discounted) && $no_pts_discounted == 1}
{l s='No reward points for this product because there\'s already a discount.' mod='loyalty'}
{l s='No reward discount for this product because there\'s already a discount.' mod='loyalty'}
{else}
{l s='No reward points for this product.' mod='loyalty'}
{l s='No reward discount for this product.' mod='loyalty'}
{/if}
{/if}
</p>

View File

@ -26,7 +26,7 @@
<!-- MODULE Loyalty -->
<p id="loyalty">
{if $points > 0}
{if $discount_value > 0}
{l s='By checking out of this shopping cart you can collect up to' mod='loyalty'} <b>{convertPrice price=$voucher}</b> {l s='to use during your next orders' mod='loyalty'}
{else}
{l s='Add some products to your shopping cart to collect some loyalty points.' mod='loyalty'}