Jump to content

Loyalty points on product attribute not working


Recommended Posts

Hello guys,

 

I encounter a small but nasty problem. (prestashop 1.5.4.1 custom theme, default theme same issue)

 

When i select an attribute for one of my products, the loyalty points not showing and i get : No point of fidelity for this product because it is discounted... even if the product of course is not discounted...

 

link with problem

 

thanks very much for helping..

 

Link to comment
Share on other sites

Thanks to Abalam, this is resolved!

 

If any got this problem, this is the solution.

 

Open ...modules/loyalty/views/templates/hook/product.tpl

Change this line :
if (!none_award && productPriceWithoutReduction != productPrice) {

Into this :
if (!none_award && ps_round(productPriceWithoutReduction, 2) != productPrice) {

Please mark this topic as Solved!

Edited by kadapawn (see edit history)
Link to comment
Share on other sites

  • 1 year later...

I know the above seems to be solved, but I have a similar issue since upgrading from 1.5.4.0 to 1.6.0.14

 

On every product, when an attribute it selected I get the message

 

"No reward points for this product"

 

Tried the above fix but it didnt work for me

 

Any idea how to resolve this.

 

Cheers

Link to comment
Share on other sites

actually, its changing the message to say "No reward points for this product"

Yet at the checkout it is still saying "By checking out this shopping cart you can collect up to 24 loyalty points that can be converted into a voucher of £1.20."

 

So the points seems to be getting handed out, but the notice to customer on the product tells them otherwise

Link to comment
Share on other sites

  • 2 weeks later...

actually, its changing the message to say "No reward points for this product"

Yet at the checkout it is still saying "By checking out this shopping cart you can collect up to 24 loyalty points that can be converted into a voucher of £1.20."

 

So the points seems to be getting handed out, but the notice to customer on the product tells them otherwise

This is the same problem I am having.  Ver 1.6.0.14  Any help here?

Link to comment
Share on other sites

  • 2 months later...

ive similar issue. if anyone hav a solution. in meantime i have done this.

 

here : themes / default-bootstrap / modules / loyalty / views / templates / hook / product.tpl change this text:

 

"No reward points for this product." to "Get x% or £/$/€y back in Reward Points as a thank you from us".

Link to comment
Share on other sites

  • 5 months later...

I've been having the same issues as others in this post as well as other posts regarding this problem.  Showing "no rewards points for this product" on product page, yet showing the proper available loyalty points once adding product to shopping cart.  Tried all recommendations I could find to no avail. 

 

If anyone is wondering, I fixed the problem by removing the following line in: themes / default-bootstrap / modules / loyalty / views / templates / hook / product.tpl

 

{addJsDefL name=loyalty_nopoints}{l s='No reward points for this product.' mod='loyalty' js=1}{/addJsDefL}

 

Afterwards loyalty points are showing up properly on product page.  Not sure if this will cause further issues down the line..

 

Hopefully a proper fix will be put out for this soon! 

 

:)

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

I've been having the same issues as others in this post as well as other posts regarding this problem.  Showing "no rewards points for this product" on product page, yet showing the proper available loyalty points once adding product to shopping cart.  Tried all recommendations I could find to no avail. 

 

If anyone is wondering, I fixed the problem by removing the following line in: themes / default-bootstrap / modules / loyalty / views / templates / hook / product.tpl

 

{addJsDefL name=loyalty_nopoints}{l s='No reward points for this product.' mod='loyalty' js=1}{/addJsDefL}

 

Afterwards loyalty points are showing up properly on product page.  Not sure if this will cause further issues down the line..

 

Hopefully a proper fix will be put out for this soon! 

 

:)

 

Thank you for that. The problem was resolved with your help!

Link to comment
Share on other sites

  • 3 weeks later...

That fixed caused a javascript error to be thrown (user does not see it but it's there none the less)

I fixed it by changing the javascript instead

@ themes\default-bootstrap\js\modules\loyalty\js\loyalty.js 

 

changed this 

$(document).ready(function() {
$(document).on('change', '#our_price_display', function(e){
updateLoyaltyView(parseInt($('#our_price_display').text()));
})
updateLoyaltyView(parseInt($('#our_price_display').text()));
});
 
to 
$(document).ready(function() {
$(document).on('change', '#our_price_display', function(e){
updateLoyaltyView(parseInt($('#our_price_display').content()));
})
updateLoyaltyView(parseInt($('#our_price_display').content()));
});
 
and it seems to be working for me
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

adel.miriam's fix worked great for me.  thanks!

 

Where can I change the loyalty message shown on the product page? I want to change this message:

 

"By buying this product you can collect up to X loyalty points. Your cart will total Y loyalty points that can be converted into a voucher of $Z."

 

to something like:

 

"This product is worth X points."

 

​Using default bootstrap theme.

Link to comment
Share on other sites

shop / themes / default-bootstrap / modules / loyalty / views / templates / hook

 

good idea might do it myself :)

 

{if $points}
{l s='By buying this product you can collect up to' mod='loyalty'} <b><span id="loyalty_points">{$points}</span> 
 
&
 
{addJsDefL name=loyalty_willcollect}{l s='By buying this product you can collect up to' mod='loyalty' js=1}{/addJsDefL}
Link to comment
Share on other sites

sorry i should be more specific...

change this:

 

{l s='By buying this product you can collect up to' mod='loyalty'} <b><span id="loyalty_points">{$points}</span> 
{if $points > 1}{l s='loyalty points' mod='loyalty'}{else}{l s='loyalty point' mod='loyalty'}{/if}</b>. 
{l s='Your cart will total' mod='loyalty'} <b><span id="total_loyalty_points">{$total_points}</span> 
{if $total_points > 1}{l s='points' mod='loyalty'}{else}{l s='point' mod='loyalty'}{/if}</b> {l s='that can be converted into a voucher of' mod='loyalty'} 
<span id="loyalty_price">{convertPrice price=$voucher}</span>.
{else}
 

to this :

 

{l s='This product is worth ' mod='loyalty'} <b><span id="loyalty_points">{$points} </span> 
{if $points > 1}{l s='loyalty points' mod='loyalty'}{else}{l s='loyalty point' mod='loyalty'}{/if}</b>. 
{else}

u can see the change here : https://vouchoff.com/sports-shops/15-10-percent-off-life-style-sports.html

Link to comment
Share on other sites

  • 6 months later...
  • 3 months later...
×
×
  • Create New...