12695 - add link to rewards in block account, fix give a gift shopping-cart display issue

This commit is contained in:
Rodney Figaro 2017-04-19 17:16:44 +02:00
parent e7281a7a34
commit a3192820d0
4 changed files with 16 additions and 5 deletions

View File

@ -933,4 +933,9 @@ class RewardsLoyaltyPlugin extends RewardsGenericPlugin
{
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'rewards_product` WHERE `id_product`='.(int)$params['object']->id);
}
public function hookDisplayHeader()
{
$this->context->smarty->assign('link_rewards', $this->context->link->getModuleLink('allinone_rewards', 'rewards', array(), true));
}
}

View File

@ -17,7 +17,7 @@
{l s='that can be converted into a voucher for a future purchase.' mod='allinone_rewards'}{if isset($guest_checkout) && $guest_checkout}<sup>*</sup>{/if}<br />
{if isset($guest_checkout) && $guest_checkout}<sup>*</sup> {l s='Not available for Instant checkout order' mod='allinone_rewards'}{/if}
{else}
{l s='Add some products to your shopping cart to collect some loyalty credits.' mod='allinone_rewards'}
{l s='The selected products are not included in the loyalty program' mod='allinone_rewards'}<br />
{/if}
<br />
<a class="convert btn btn2" href='{$link_rewards}?shoppingcart=1'><span>{l s='Consult my rewards account' mod='allinone_rewards'}</span></a>

View File

@ -1,11 +1,17 @@
<!-- Block myaccount module -->
<div id="infos-client" class="myaccount md6">
<div id="infos-client" class="myaccount md9">
<span class="header-title">{l s='My account' mod='blockmyaccount'}</span>
<ul>
<li>
<a href="{$link->getPageLink('history', true)|escape:'html':'UTF-8'}" title="{l s='My orders' mod='blockmyaccount'}">
{l s='My orders' mod='blockmyaccount'}
</a>
{if Module::isEnabled('allinone_rewards') && isset($link_rewards)}
/
<a href="{$link_rewards}" title="{l s='My rewards' mod='blockmyaccount'}">
{l s='My rewards' mod='blockmyaccount'}
</a>
{/if}
</li>
<li>
<a href="{$link->getPageLink('index', true, NULL, 'mylogout')|escape:'html'}" title="{l s='Logout'}">

View File

@ -6,7 +6,7 @@
</div-->
<div class="md12 text-center">
<div class="row">
<div class="md1" id="scrolls-left">
<div class="sm1" id="scrolls-left">
{foreach from=$ranges item=range name=range_loop}
{assign var=index value=$smarty.foreach.range_loop.index + 1}
<div class="arrow_container">
@ -14,7 +14,7 @@
</div>
{/foreach}
</div>
<div class="md10" id="gifts-list">
<div class="sm10" id="gifts-list">
{foreach from=$ranges item=range name=range_loop}
{assign var=index value=$smarty.foreach.range_loop.index + 1}
<div class="gift_range" id="range_{$index|escape:'html':'UTF-8':'intval'}" data-range="{$index|escape:'html':'UTF-8':'intval'}">
@ -63,7 +63,7 @@
</div>
{/foreach}
</div>
<div class="md1" id="scrolls-right">
<div class="sm1" id="scrolls-right">
{foreach from=$ranges item=range name=range_loop}
{assign var=index value=$smarty.foreach.range_loop.index + 1}
<div class="arrow_container">