Merge branch 'ticket-fidelite' into develop
This commit is contained in:
commit
1b2020f041
@ -38,6 +38,12 @@ $controller->preProcess();
|
||||
if (!$cookie->isLogged())
|
||||
Tools::redirect('authentication.php?back=modules/loyalty/loyalty-program.php');
|
||||
|
||||
// ANTADIS si espagne redirect
|
||||
global $site_version;
|
||||
if ($cookie->id_lang == 3 || $site_version == 'es') {
|
||||
Tools::redirect('my-account.php');
|
||||
}
|
||||
|
||||
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'));
|
||||
|
||||
|
@ -450,6 +450,10 @@ class Loyalty extends Module
|
||||
/* Hook display on product detail */
|
||||
public function hookExtraRight($params)
|
||||
{
|
||||
global $site_version;
|
||||
if ($site_version == 'es') {
|
||||
return;
|
||||
}
|
||||
include_once(dirname(__FILE__).'/LoyaltyModule.php');
|
||||
|
||||
global $smarty;
|
||||
@ -491,6 +495,10 @@ class Loyalty extends Module
|
||||
/* Hook display on customer account page */
|
||||
public function hookCustomerAccount($params)
|
||||
{
|
||||
global $site_version, $cookie;
|
||||
if ($site_version == 'es' || $cookie->id_lang == 3) {
|
||||
return;
|
||||
}
|
||||
return $this->display(__FILE__, 'my-account.tpl');
|
||||
}
|
||||
|
||||
@ -544,9 +552,11 @@ class Loyalty extends Module
|
||||
/* Hook display on shopping cart summary */
|
||||
public function hookShoppingCart($params)
|
||||
{
|
||||
global $site_version, $smarty;
|
||||
if ($site_version == 'es') {
|
||||
return;
|
||||
}
|
||||
include_once(dirname(__FILE__).'/LoyaltyModule.php');
|
||||
|
||||
global $smarty;
|
||||
|
||||
if (Validate::isLoadedObject($params['cart']))
|
||||
{
|
||||
@ -571,6 +581,11 @@ class Loyalty extends Module
|
||||
|
||||
if (!Validate::isLoadedObject($params['customer']) OR !Validate::isLoadedObject($params['order']))
|
||||
die(Tools::displayError('Missing parameters'));
|
||||
|
||||
global $site_version;
|
||||
if ($site_version == 'es' || (int)$params['order']->id_lang == 3) {
|
||||
return true;
|
||||
}
|
||||
$loyalty = new LoyaltyModule();
|
||||
$loyalty->id_customer = (int)$params['customer']->id;
|
||||
$loyalty->id_order = (int)$params['order']->id;
|
||||
@ -592,6 +607,9 @@ class Loyalty extends Module
|
||||
die(Tools::displayError('Missing parameters'));
|
||||
$newOrder = $params['newOrderStatus'];
|
||||
$order = new Order((int)($params['id_order']));
|
||||
if ($order->id_lang == 3) {
|
||||
return true;
|
||||
}
|
||||
if ($order AND !Validate::isLoadedObject($order))
|
||||
die(Tools::displayError('Incorrect object Order.'));
|
||||
$this->instanceDefaultStates();
|
||||
|
@ -43,7 +43,7 @@
|
||||
<ul class="submenu_top">
|
||||
<li><a href="{$link->getPageLink('history.php', true)}" title="{l s='Orders' mod='blockuserinfo'}">{l s='History and details of my orders' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('identity.php', true)}" title="{l s='Information' mod='blockuserinfo'}">{l s='My personal information' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='Loyalty program' mod='blockuserinfo'}">{l s='Loyalty program' mod='blockuserinfo'}</a></li>
|
||||
{if $cookie->id_lang != 3}<li><a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='Loyalty program' mod='blockuserinfo'}">{l s='Loyalty program' mod='blockuserinfo'}</a></li>{/if}
|
||||
<li><a href="{$link->getPageLink('order-slip.php', true)}" title="{l s='Credit slips' mod='blockuserinfo'}">{l s='My credit slips' mod='blockuserinfo'}</a></li>
|
||||
<li><a title="Referral program" href="{$base_dir_ssl}modules/invite/invite-program.php">{l s='Programme de parrainage' mod='blockuserinfo'}</a></li>
|
||||
<li class="logout">
|
||||
@ -55,6 +55,11 @@
|
||||
</div>
|
||||
{if $display_credits}
|
||||
<div class="inner">
|
||||
{if $cookie->id_lang == 3}
|
||||
<a class="credit" href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">
|
||||
<span class="desc">{l s='Your credit:' mod='blockuserinfo'} <span class="green">{$customer_credit}</span></span>
|
||||
</a>
|
||||
{else}
|
||||
<ul>
|
||||
<li class="account_hover">
|
||||
<a class="submenu_top_btn credit" href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">{l s='Your credit' mod='blockuserinfo'}</a>
|
||||
@ -71,6 +76,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{if $discount_value > 0}
|
||||
<p id="loyalty_cart">
|
||||
{l s='En validant ce panier vous recevrez un crédit de '} <b>{convertPrice price=$voucher}</b> {l s='à utiliser lors de vos prochaines commandes'}
|
||||
{l s='En validant ce panier vous recevrez un crédit fidélité de '} <b>{convertPrice price=$voucher}</b> {l s='à utiliser lors de vos prochaines commandes'}
|
||||
</p>
|
||||
{/if}
|
Loading…
Reference in New Issue
Block a user