Merge branch 'ticket-fidelite' into develop
This commit is contained in:
commit
02bff329ca
@ -114,6 +114,7 @@ class LoyaltyModule extends ObjectModel
|
||||
}
|
||||
foreach ($cart->getDiscounts(false) AS $discount)
|
||||
$total -= $discount['value_real'];
|
||||
|
||||
}
|
||||
|
||||
return self::getDiscountValueByPrice($total);
|
||||
@ -154,10 +155,9 @@ class LoyaltyModule extends ObjectModel
|
||||
if ($currency->conversion_rate)
|
||||
$price = $price / $currency->conversion_rate;
|
||||
}
|
||||
|
||||
$discount_value = (float)(Configuration::get('PS_LOYALTY_PERCENT_VALUE') * $price) / 100;
|
||||
|
||||
return (float)$discount_value;
|
||||
return $discount_value;
|
||||
}
|
||||
|
||||
/*public static function getPointsByCustomer($id_customer)
|
||||
|
@ -459,9 +459,9 @@ class Loyalty extends Module
|
||||
{
|
||||
if (Validate::isLoadedObject($params['cart']))
|
||||
{
|
||||
$discountValueBefore = (int)(LoyaltyModule::getCartDiscountValue($params['cart']));
|
||||
$discountValueAfter = (int)(LoyaltyModule::getCartDiscountValue($params['cart'], $product));
|
||||
$discountValue = (int)($discountValueAfter - $discountValueBefore);
|
||||
$discountValueBefore = (LoyaltyModule::getCartDiscountValue($params['cart']));
|
||||
$discountValueAfter = (LoyaltyModule::getCartDiscountValue($params['cart'], $product));
|
||||
$discountValue = ($discountValueAfter - $discountValueBefore);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
<!-- MODULE Loyalty -->
|
||||
<p id="loyalty">
|
||||
<img src="{$module_template_dir}loyalty.gif" alt="{l s='loyalty' mod='loyalty'}" class="icon" />
|
||||
{if $discount_value > 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='that can be converted into a voucher of' mod='loyalty'} {convertPrice price=$voucher}{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='loyalty'}{/if}
|
||||
|
@ -25,16 +25,16 @@
|
||||
*}
|
||||
|
||||
|
||||
{if $points}
|
||||
{if $discountValue>0}
|
||||
<div id="loyalty" class="align_justify">
|
||||
<p class="title">
|
||||
<img src="/img/loyalty.jpg" alt="{l s='Loyalty program' mod='loyalty'}" class="icon" />
|
||||
<span class="title_text">{l s='Loyalty credit' mod='loyalty'} <span class="loyalty_price">{convertPrice price=($points * $point_value)}</span></span>
|
||||
<span class="title_text">{l s='Loyalty credit' mod='loyalty'} <span class="loyalty_price">{convertPrice price=$discountValue}</span></span>
|
||||
</p>
|
||||
<div class="desc">
|
||||
{if $points}
|
||||
{l s='By buying this product you can collect up to' mod='loyalty'} <b><span id="loyalty_points">{convertPrice price=($points * $point_value)}</span></b>
|
||||
{l s='de crédits fidélité, à utiliser sur votre prochaine commande. '}
|
||||
{if $total_discounts>0}
|
||||
{l s='By buying this product you can collect up to' mod='loyalty'} <b><span id="loyalty_points">{convertPrice price=$total_discounts}</span></b>
|
||||
{l s='de crédits fidélité, à utiliser sur votre prochaine commande. '}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<p id="loyalty_cart">
|
||||
{if $points > 0}
|
||||
{if $discount_value > 0}
|
||||
{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'}
|
||||
{/if}
|
||||
</p>
|
Loading…
Reference in New Issue
Block a user