Jump to content

Loyalty program doesn't update on attributes


Recommended Posts

Hi everyone,

 

Wonder if anyone can help. My loyalty points always show the maximum you can get on the higher priced  combination, even when the customer has selected a lower cost option. This is then corrected in the cart, but causes an issue that customer is being told on product page he'll collect on the cart for e.g. 10 points but then only gets 2.

 

I saw a post for different version with the products.tpl change solution but doesn't seem to work for 1.5.6.0 with module loyalty version 1.9

 

Would really appreciate some help as I feel we're misleading customers and am uncomfortable with it.

 

Thanks in advance.

 

Cheers

Link to comment
Share on other sites

Hi everyone,

 

Wonder if anyone can help. My loyalty points always show the maximum you can get on the higher priced  combination, even when the customer has selected a lower cost option. This is then corrected in the cart, but causes an issue that customer is being told on product page he'll collect on the cart for e.g. 10 points but then only gets 2.

 

I saw a post for different version with the products.tpl change solution but doesn't seem to work for 1.5.6.0 with module loyalty version 1.9

 

Would really appreciate some help as I feel we're misleading customers and am uncomfortable with it.

 

Thanks in advance.

 

Cheers

I have the same problem with prestashop 1.5.6.1 and loyalty 1.9

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

Hi everyone,

 

Here's the solution for PS 1.5.6.2 and loyalty module 1.13

 

Actually, the problem comes from a javascript variable which is not correctly defined and set to local instead of global. You must modifiy three files in your theme :

 

First go to themes/mytheme/modules/loyalty/product.tpl and change line at the beginning of the file (line 42 for me):

 

var points = Math.round(productPrice / point_rate);

 

into :

 

var points = Math.round(productPriceDisplay / point_rate);

 

 

Then, go to themes/mytheme/product.tpl and find line (89 for me):

 

var productPrice = '{$productPrice}';

 

Keep that line unchanged and add below that new line :

 

var productPriceDisplay = '{$productPrice}';

 

So that finally you stay with your code as follows :

 

var productPrice = '{$productPrice}';

var productPriceDisplay = '{$productPrice}';

 

 

And finally, go to themes/mytheme/js/product.js, and find function updateDisplay() (line 149 for me), and at the beginning of the function, find line :

 

var productPriceDisplay = productPrice;

 

And change it into

 

productPriceDisplay = productPrice;

 

You're done !

Beware that this works for 1.5.6.2 and loyalty 1.13. Don't know what it will do in other versions

Link to comment
Share on other sites

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