Jump to content

Loyalty Points - No reward points for this product when attribute chosen


Recommended Posts

In the product detail info page loyalty program displays "No reward points for this product" and it seems like any products with attributes have this issue.It first displays Loyalty points correctly but when I choose other attribute then it shows "No reward points for this product" I have tried suggested solutions but nothing worked out for me.

I am on ver. 1.6.1.1 with default-bootstrap.

Anyone solved the issue, please share

Thanks.

Link to comment
Share on other sites

HI

The same situation, on product page with atributes first show loyalty point from the biggest product pack ( 10 product in bulk), when i change bilk option thaen got info ""No reward points for this product"". But when i put any product to cart then on checkout it show correct lotalty point, What is going on ? How to fix it ?

Thank you

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

With this trick?

 

"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

It's strange, I have prestashop 1.6.0.9 and it works...

 

Ok first I copied the loyalty module folder in prestashop/modules and I pasted it in prestashop/themes/nameofmytheme/modules and overwrite it.

 

After I modified the en.php file and also fr.php ... my web site has 2 languages.... so in prestashop/themes/nameofyourtheme/modules/loyalty/translation/en.php  or the language you use.

 

You'll have this :

<?php

global $_MODULE;
$_MODULE = array();

$_MODULE['<{loyalty}prestashop>loyalty_30146a132c2aa28808a8411ed74c12ed'] = 'Customer loyalty and rewards';
$_MODULE['<{loyalty}prestashop>loyalty_f8763c754ba455aa6e8ddf0e62911eb7'] = 'Provide a loyalty program to your customers.';
$_MODULE['<{loyalty}prestashop>loyalty_f0338d5a7bbd642cc188ca69c8a97b12'] = 'Are you sure you want to delete all loyalty points and customer history?';
$_MODULE['<{loyalty}prestashop>loyalty_7307b68f93443d5863f1d3943c546b20'] = 'Loyalty reward';
$_MODULE['<{loyalty}prestashop>loyalty_e81b2826b5aebd9c92fb5d090f0cdc9d'] = 'You must choose at least one category for voucher\'s action';
$_MODULE['<{loyalty}prestashop>loyalty_f38f5974cdc23279ffe6d203641a8bdf'] = 'Settings updated.';
$_MODULE['<{loyalty}prestashop>loyalty_8b80d4b6307990874b832cc15a92e5a3'] = 'Missing parameters';
$_MODULE['<{loyalty}prestashop>loyalty_a82e0d057f443115e807bd6ca595fc8c'] = 'Incorrect Order object.';
$_MODULE['<{loyalty}prestashop>loyalty_94c69408d25102ba7ddcf3533b56c407'] = 'Incorrect Customer object.';
$_MODULE['<{loyalty}prestashop>loyalty_94c2a3734a95577d173f702aa67a4788'] = 'Loyalty points (%d points)';
$_MODULE['<{loyalty}prestashop>loyalty_309cd9f5437d1bb06a7fdab1811afe1a'] = 'This customer has no points';
$_MODULE['<{loyalty}prestashop>loyalty_a240fa27925a635b08dc28c9e4f9216d'] = 'Order';
$_MODULE['<{loyalty}prestashop>loyalty_44749712dbec183e983dcd78a7736c41'] = 'Date';
$_MODULE['<{loyalty}prestashop>loyalty_aa7f22f84f7be784055a3e7e7d22c519'] = 'Total (without shipping)';
$_MODULE['<{loyalty}prestashop>loyalty_75dd5f1160a3f02b6fae89c54361a1b3'] = 'Points';
$_MODULE['<{loyalty}prestashop>loyalty_1026e44f047fb9da36a62c0a8846baac'] = 'Points Status';
$_MODULE['<{loyalty}prestashop>loyalty_98ab04462a3ea83fe76f4163efe755da'] = '#%d';
$_MODULE['<{loyalty}prestashop>loyalty_66c2c90ea9f6f4a12854195085781d7f'] = 'Total points available:';
$_MODULE['<{loyalty}prestashop>loyalty_928666bdf20510dfa5c58393b77f1798'] = 'Voucher value:';
$_MODULE['<{loyalty}prestashop>loyalty_a9be824aae4f2381a27b7c699b1e041e'] = 'Awaiting validation';
$_MODULE['<{loyalty}prestashop>loyalty_78945de8de090e90045d299651a68a9b'] = 'Available';
$_MODULE['<{loyalty}prestashop>loyalty_a149e85a44aeec9140e92733d9ed694e'] = 'Cancelled';
$_MODULE['<{loyalty}prestashop>loyalty_4cb08bf5ad3d3c7b010dde725a078b28'] = 'Already converted';
$_MODULE['<{loyalty}prestashop>loyalty_df05c2db84dacb19b599b489bf3963db'] = 'Unavailable on discounts';
$_MODULE['<{loyalty}prestashop>loyalty_01371a1d58e9234c0b9dbc08cf54fa8b'] = 'Not available on discounts.';
$_MODULE['<{loyalty}prestashop>loyalty_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{loyalty}prestashop>loyalty_8334a158298fbcf163f4dcb4a387d150'] = 'Ratio';
$_MODULE['<{loyalty}prestashop>loyalty_ea92f82fb14a544ac9d38c3e6c8dc03b'] = '= 1 reward point.';
$_MODULE['<{loyalty}prestashop>loyalty_cd53f34f7289c573ba717b7767919a96'] = '1 point =';
$_MODULE['<{loyalty}prestashop>loyalty_bd43f22cbd337b68c1ee876323e1241d'] = 'for the discount.';
$_MODULE['<{loyalty}prestashop>loyalty_1063340c25c87a309d79f5c049246a0f'] = 'Validity period of a point';
$_MODULE['<{loyalty}prestashop>loyalty_44fdec47036f482b68b748f9d786801b'] = 'days';
$_MODULE['<{loyalty}prestashop>loyalty_98cf9475009d3c6e795ffac5d391cec4'] = 'Voucher details';
$_MODULE['<{loyalty}prestashop>loyalty_dd98e4d652530674f61201056fdbe9b4'] = 'Minimum amount in which the voucher can be used';
$_MODULE['<{loyalty}prestashop>loyalty_af720a2679a80545d064cf0350a7fc38'] = 'Apply taxes on the voucher';
$_MODULE['<{loyalty}prestashop>loyalty_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled';
$_MODULE['<{loyalty}prestashop>loyalty_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled';
$_MODULE['<{loyalty}prestashop>loyalty_ade45d72ab6ba1ab576d8b9deb0c2438'] = 'Points are awarded when the order is';
$_MODULE['<{loyalty}prestashop>loyalty_9611a682e61c503c32e2dc58fdbc8ddf'] = 'Points are cancelled when the order is';
$_MODULE['<{loyalty}prestashop>loyalty_51ab56dd5b46c7b5c8fdf22651ae0db6'] = 'Give points on discounted products';
$_MODULE['<{loyalty}prestashop>loyalty_e32f75d18c920282f6d8770d19d43d91'] = 'Vouchers created by the loyalty system can be used in the following categories:';
$_MODULE['<{loyalty}prestashop>loyalty_9516494d859b2819c76023f8ce906795'] = 'Mark the boxes of categories in which loyalty vouchers can be used.';
$_MODULE['<{loyalty}prestashop>loyalty_91b442d385b54e1418d81adc34871053'] = 'Selected';
$_MODULE['<{loyalty}prestashop>loyalty_b56c3bda503a8dc4be356edb0cc31793'] = 'Collapse All';
$_MODULE['<{loyalty}prestashop>loyalty_5ffd7a335dd836b3373f5ec570a58bdc'] = 'Expand All';
$_MODULE['<{loyalty}prestashop>loyalty_5e9df908eafa83cb51c0a3720e8348c7'] = 'Check All';
$_MODULE['<{loyalty}prestashop>loyalty_9747d23c8cc358c5ef78c51e59cd6817'] = 'Uncheck All';
$_MODULE['<{loyalty}prestashop>loyalty_c9cc8cce247e49bae79f15173ce97354'] = 'Save';
$_MODULE['<{loyalty}prestashop>loyalty_30e793698766edbaaf84a74d4c377f72'] = 'Loyalty points progression';
$_MODULE['<{loyalty}prestashop>loyalty_4f2a91e15af2631ff9424564b8a45fb2'] = 'Initial';
$_MODULE['<{loyalty}prestashop>loyalty_453e6aa38d87b28ccae545967c53004f'] = 'Unavailable';
$_MODULE['<{loyalty}prestashop>loyalty_6366c60fc5b4f4fce0e3dd146494a4f4'] = 'Converted';
$_MODULE['<{loyalty}prestashop>loyalty_13148717f8faa9037f37d28971dfc219'] = 'Validation';
$_MODULE['<{loyalty}prestashop>loyalty_36c94bd456cf8796723ad09eac258aef'] = 'Manage my account';
$_MODULE['<{loyalty}prestashop>loyalty_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'My account';
$_MODULE['<{loyalty}prestashop>loyalty_c540093e64d84440025b2d8201f04336'] = 'My loyalty points';
$_MODULE['<{loyalty}prestashop>loyalty_01abfc750a0c942167651c40d088531d'] = '#';
$_MODULE['<{loyalty}prestashop>loyalty_5acc2ceeb883ba07cef2d02ea382f242'] = 'You have not placed any orders.';
$_MODULE['<{loyalty}prestashop>loyalty_dd1f775e443ff3b9a89270713580a51b'] = 'Previous';
$_MODULE['<{loyalty}prestashop>loyalty_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Next';
$_MODULE['<{loyalty}prestashop>loyalty_e0aa021e21dddbd6d8cecec71e9cf564'] = 'OK';
$_MODULE['<{loyalty}prestashop>loyalty_6c583afb157e33bfb5b7c3d4114c4dd5'] = 'items:';
$_MODULE['<{loyalty}prestashop>loyalty_c48105520852bbd0fa692e4c9fd61628'] = 'Vouchers generated here are usable in the following categories : ';
$_MODULE['<{loyalty}prestashop>loyalty_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'All';
$_MODULE['<{loyalty}prestashop>loyalty_5b7d558a20e8bcb6d9355a012becb1eb'] = 'Are you sure you want to transform your points into vouchers?';
$_MODULE['<{loyalty}prestashop>loyalty_4db04271e368fe3d4e1aa7332a18fa9d'] = 'Transform my points into a voucher of';
$_MODULE['<{loyalty}prestashop>loyalty_b39cba8836db01a04888aef6ba386420'] = 'My vouchers from loyalty points';
$_MODULE['<{loyalty}prestashop>loyalty_0eceeb45861f9585dd7a97a3e36f85c6'] = 'Created';
$_MODULE['<{loyalty}prestashop>loyalty_689202409e48743b914713f96d93947c'] = 'Value';
$_MODULE['<{loyalty}prestashop>loyalty_ca0dbad92a874b2f69b549293387925e'] = 'Code';
$_MODULE['<{loyalty}prestashop>loyalty_eb902cf204f3e4dfffeb56d92a9b5c26'] = 'Valid from';
$_MODULE['<{loyalty}prestashop>loyalty_b2844b8e17ecaaeae68d018fe9418af0'] = 'Valid until';
$_MODULE['<{loyalty}prestashop>loyalty_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{loyalty}prestashop>loyalty_3ec365dd533ddb7ef3d1c111186ce872'] = 'Details';
$_MODULE['<{loyalty}prestashop>loyalty_29aa46cc3d2677c7e0f216910df600ff'] = 'Free shipping';
$_MODULE['<{loyalty}prestashop>loyalty_2c8bb57a0b1dff255f3d6684a9fddda3'] = 'Ready to use';
$_MODULE['<{loyalty}prestashop>loyalty_24b9e0a0faa7aa28dcadeb4cf7f860fd'] = 'Already used';
$_MODULE['<{loyalty}prestashop>loyalty_2af3bf4c82c5b33875d532820a959799'] = 'Generated by these following orders';
$_MODULE['<{loyalty}prestashop>loyalty_18fb6221fe0d9895c2e9ba08283f00e9'] = 'Order #%d';
$_MODULE['<{loyalty}prestashop>loyalty_4c8d2e0395ae7d21e374dcbeb1cbeaaa'] = '%d points.';
$_MODULE['<{loyalty}prestashop>loyalty_1f67ea7a0b26e9eacc70523bde28df0c'] = 'more...';
$_MODULE['<{loyalty}prestashop>loyalty_a16cf3ec5200cc519f4fe48e34b1df83'] = 'The minimum order amount in order to use these vouchers is:';
$_MODULE['<{loyalty}prestashop>loyalty_8e69341aca5dbf9f55c2e75a2ed5df3c'] = 'No vouchers yet.';
$_MODULE['<{loyalty}prestashop>loyalty_00d56a5e37c19c59d521530fc8e7f337'] = 'No reward points yet.';
$_MODULE['<{loyalty}prestashop>loyalty_0b3db27bc15f682e92ff250ebb167d4b'] = 'Back to Your Account';
$_MODULE['<{loyalty}prestashop>loyalty_8cf04a9734132302f96da8e113e80ce5'] = 'Home';
$_MODULE['<{loyalty}prestashop>my-account_c540093e64d84440025b2d8201f04336'] = 'My loyalty points';
$_MODULE['<{loyalty}prestashop>product_054a9c66cc92b7f1bfcacee3b7c7ad54'] = 'No reward points for this product because there\'s already a discount.';
--> $_MODULE['<{loyalty}prestashop>product_e94d481804904a48c1a8093e7a069570'] = 'By buying this product you can collect up to 1 loyalty point. Your cart will total 1 point that can be converted into a voucher of CAD$0.20.';
$_MODULE['<{loyalty}prestashop>product_08ef6b34ab8e7039ef0ee69378f0ac0b'] = 'By buying this product you can collect up to';
$_MODULE['<{loyalty}prestashop>product_2996152bb442bf98c80c515c6055de5f'] = 'loyalty points';
$_MODULE['<{loyalty}prestashop>product_b40d5c523ee75453134b1449dd9cd13a'] = 'loyalty point';
$_MODULE['<{loyalty}prestashop>product_b9cb3a85529dd593c14c838e22976cff'] = 'Your cart will total';
$_MODULE['<{loyalty}prestashop>product_0aab81de5c4c87021772015efc184d67'] = 'points';
$_MODULE['<{loyalty}prestashop>product_78ee54aa8f813885fe2fe20d232518b9'] = 'point';
$_MODULE['<{loyalty}prestashop>product_443c3e03e194c2a4cdb107808b051615'] = 'that can be converted into a voucher of';
$_MODULE['<{loyalty}prestashop>shopping-cart_ea2c0ea1a08add3a75273e7f32f05f7a'] = 'loyalty';
$_MODULE['<{loyalty}prestashop>shopping-cart_562b7108857d8394e83861d0529cc7dd'] = 'By checking out this shopping cart you can collect up to';
$_MODULE['<{loyalty}prestashop>shopping-cart_1340ddee36660d8e1d5f6918dee0ba4e'] = '%d loyalty points';
$_MODULE['<{loyalty}prestashop>shopping-cart_e7e421ccebbe3fafffe0f67dbd595d5b'] = '%d loyalty point';
$_MODULE['<{loyalty}prestashop>shopping-cart_443c3e03e194c2a4cdb107808b051615'] = 'that can be converted into a voucher of';
$_MODULE['<{loyalty}prestashop>shopping-cart_2d354f4df80bbebf309f184c3953dc1d'] = 'Not available for Instant checkout order';
$_MODULE['<{loyalty}prestashop>shopping-cart_8cec799df06a3f5a026b31fcd95e0172'] = 'Add some products to your shopping cart to collect some loyalty points.';
$_MODULE['<{loyalty}prestashop>loyalty_cec73b5ce095a59305ad92a0d47495cb'] = 'To use';
$_MODULE['<{loyalty}prestashop>loyalty_019d1ca7d50cc54b995f60d456435e87'] = 'Used';


return $_MODULE;

I don't have the # of the line, I put an arrow next to it ... this line saying ''no rewards point for this product'' and I modified it with the new comment.

 

Like this its working perfectly !

 

Hope it will help you !

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

  • 4 weeks later...

My shop also displays "No reward points for this product" and yet gives points in the shopping cart but -  for all products even those without attributes

 

I used Prestashop Cloud before and it worked fine :/ I want to tell my customers about my loyalty point program but feel they will get put off when the site tells them they'll get none!

 

I have edited the product.tpl fil in default bootstrap etc to change the sentence but it made no difference and isn't what I want anyway

 

Attached two screenshots - I quickly took the first before the page loaded and you can see the amount of points awarded - this is what I want, why oh why can't it just work ???????

 

Soooo frustrating

 

post-1101434-0-72729400-1447457447_thumb.jpg

post-1101434-0-50394000-1447457483_thumb.jpg

post-1101434-0-97789100-1447458043_thumb.jpg

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...

Customer Loyalty and Rewards v1.2.9

I had same problems as above, and spent hours working on it.

 

I did change the currency format and that did correct the display problem as well, but I am in the States and having currency displayed in an EU format is awkward here, so....

 

The only solution that worked for me (and I still am unclear if I missed anything) was to delete the js folder in the /modules/loyalty folder.

(it has a zero length file named loyalty.js)

 

I then did a RESET on the module from the admin panel, reconfigured the options and it began working.

 

I know it is very frustrating to have ZERO response on this forum when you have problems with your website, so I hope that this helps somebody with the same problem.

 

PS: I may have uninstalled and reinstalled the module AFTER deleting the js folder, but I cannot remember as I was working on two sites with this same problem at the same time.

 

PPS: I will also be cross posting this solution on the other threads that I found with no solutions in case it helps them.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

i didnt check for combinations, but in general if all your products say no loyalty points for this product....

try this

https://github.com/PrestaShop/PrestaShop/pull/5128/files

it will probably fix it for you... for attribs too.

[sOLVED] Copied text found in the file at the above referenced link and pasted it in place of the same file in my theme's same folder - and Boom! it works with attributes.

Thank You for Being You :)

Link to comment
Share on other sites

  • 2 weeks later...

i didnt check for combinations, but in general if all your products say no loyalty points for this product....

try this

https://github.com/PrestaShop/PrestaShop/pull/5128/files

it will probably fix it for you... for attribs too.

 

This solution worked for me. I copy-pasted the corrected github file and replaced the code of my Warehouse template file for this module, clear cache, recompile, and everything's good.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

i didnt check for combinations, but in general if all your products say no loyalty points for this product....

try this

https://github.com/PrestaShop/PrestaShop/pull/5128/files

it will probably fix it for you... for attribs too.

This fix Works BUT 

this line

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

 

Without it the reviews module breaks & you cannot leave a review can someone fix this please

Link to comment
Share on other sites

  • 2 weeks later...

Customer Loyalty and Rewards v1.2.9

I had same problems as above, and spent hours working on it.

 

I did change the currency format and that did correct the display problem as well, but I am in the States and having currency displayed in an EU format is awkward here, so....

 

The only solution that worked for me (and I still am unclear if I missed anything) was to delete the js folder in the /modules/loyalty folder.

(it has a zero length file named loyalty.js)

 

I then did a RESET on the module from the admin panel, reconfigured the options and it began working.

 

I know it is very frustrating to have ZERO response on this forum when you have problems with your website, so I hope that this helps somebody with the same problem.

 

PS: I may have uninstalled and reinstalled the module AFTER deleting the js folder, but I cannot remember as I was working on two sites with this same problem at the same time.

 

PPS: I will also be cross posting this solution on the other threads that I found with no solutions in case it helps them.

I tried this and it was still the same.

 

Deleted JS folder

Uninstall the module

install the module back

configure the module

Problem still persist

Link to comment
Share on other sites

Comment out line 30 in /themes/your-theme/js/modules/loyalty/js/loyalty.js

 

should read:

$(document).ready(function() {
	$(document).on('change', '#our_price_display', function(e){
		updateLoyaltyView(parseInt($('#our_price_display').text()));
	});
/* FOLLOWING LINE COMMENTED OUT FOR INTERIM POINTS DISPLAY FIX - OBE */
/*	updateLoyaltyView(parseInt($('#our_price_display').text())); */
});

It will still be broken for combinations, but everything else should work fine...

 

Not pretty, but it is better than everything saying No reward points :(

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

Comment out line 30 in /themes/your-theme/js/modules/loyalty/js/loyalty.js

 

should read:

$(document).ready(function() {
	$(document).on('change', '#our_price_display', function(e){
		updateLoyaltyView(parseInt($('#our_price_display').text()));
	});
/* FOLLOWING LINE COMMENTED OUT FOR INTERIM POINTS DISPLAY FIX - OBE */
/*	updateLoyaltyView(parseInt($('#our_price_display').text())); */
});

It will still be broken for combinations, but everything else should work fine...

 

Not pretty, but it is better than everything saying No reward points :(

well thats the thing the reviews & combinations are build in so we still have a issue everything should work. The only work around I had so far was to go with Ytopo mod for reviews at least the loyalty points & combo's work for me its just reviews in my case

Link to comment
Share on other sites

well thats the thing the reviews & combinations are build in so we still have a issue everything should work. The only work around I had so far was to go with Ytopo mod for reviews at least the loyalty points & combo's work for me its just reviews in my case

So am I reading this correctly... This code change breaks your native "reviews" but makes everything else work as it should?

 

...or is it that you only changed to Ytopo module for reviews, which allowed the loyalty points with combinations to work correctly?

 

The reason I am seeking clarification is that if the native reviews module being uninstalled fixes the loyalty points display problem, then I need to dig into the reviews module code to see what it happening there.

 

Thanks for the feedback... I have gotten nowhere with the PrestaForge bug report that I made for this, so trying to figure it out on my own - and java-anything is not my forte! lol

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

So am I reading this correctly... This code change breaks your native "reviews" but makes everything else work as it should?

 

...or is it that you only changed to Ytopo module for reviews, which allowed the loyalty points with combinations to work correctly?

 

The reason I am seeking clarification is that if the native reviews module being uninstalled fixes the loyalty points display problem, then I need to dig into the reviews module code to see what it happening there.

 

Thanks for the feedback... I have gotten nowhere with the PrestaForge bug report that I made for this, so trying to figure it out on my own - and java-anything is not my forte! lol

I am saying that the fix will allows your loyalty points to display but removing the line of code I quoted breaks the native Reviews so if you want reviews which I do I installed Ytopo as a work around. I would prefer the native Reviews

Link to comment
Share on other sites

I am saying that the fix will allows your loyalty points to display but removing the line of code I quoted breaks the native Reviews so if you want reviews which I do I installed Ytopo as a work around. I would prefer the native Reviews

 

Gotcha... that is why I only commented out line 30 in the /themes/your-theme/js/modules/loyalty/js/loyalty.js code as with that modification I am able to use both native reviews and have at least a partial fix on the bug displaying the no rewards points all the time.

 

Maybe I will go back and see if I can figure out why deleting the other line in the template file fixes the issue but breaks the reviews.

Link to comment
Share on other sites

I am saying that the fix will allows your loyalty points to display but removing the line of code I quoted breaks the native Reviews so if you want reviews which I do I installed Ytopo as a work around. I would prefer the native Reviews

 

Trying the following changes in /themes/your-theme/js/modules/loyalty/js/loyalty.js

$(document).ready(function() {
	$(document).on('change', '#our_price_display', function(e){
		updateLoyaltyView(parseFloat($('#our_price_display').text().replace("$", "")));
	});
/* FOLLOWING LINE COMMENTED OUT FOR INTERIM POINTS DISPLAY FIX - SDM */
	updateLoyaltyView(parseFloat($('#our_price_display').text().replace("$", "")));
});

Since the document object contains a currency symbol, the [replace("$", "")] part of the codes strips that, and the parseFloat grabs the full value of the displayed price - not just the integer value... I have it working on one of my test sites, but of course it is not working on my production site.

Link to comment
Share on other sites

  • 4 weeks later...

I fixed it by changing the javascript 


@ 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 this

 


$(document).ready(function() {

$(document).on('change', '#our_price_display', function(e){

updateLoyaltyView(parseInt($('#our_price_display').content()));

})

updateLoyaltyView(parseInt($('#our_price_display').content()));

});

Link to comment
Share on other sites

 

I fixed it by changing the javascript 

@ 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 this
 
$(document).ready(function() {
$(document).on('change', '#our_price_display', function(e){
updateLoyaltyView(parseInt($('#our_price_display').content()));
})
updateLoyaltyView(parseInt($('#our_price_display').content()));
});

 

Thanks Adel, but it doesn't work for me. This fix may work with the default theme and configuration, not sure because I am unable to test that at the moment, but on my production site, I have a related products slider on my product page that apparently gets its javascript disabled when I apply this fix. I will look into this again soon and see if I can find what may be causing that issue.

 

I also tried the following variation to make sure the currency symbol isn't causing a problem - but that did not work either.

updateLoyaltyView(parseFloat($('#our_price_display').content().replace("$", "")));

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

  • 4 months later...

Hi all. Is there a proper fix for this yet? I'm asking as I have the same problem of the loyalty points stops the review working.

 

My theme had the Loyalty Points removed from the product page and cart but for some odd reason it came back on the product page after some changes to other country and visitor tax options.

 

I applied the earlier Github code fix to get Loyalty points working, but as stated from all of you, the Product Reviews is now not working. For the time being, I have disabled the reviews section.

 

Additionally now loyalty points is working, it has broken the layout of my related products. They used to be in a carousel but now they are in a list.

 

Website is https://calligraphyarts.co.uk/shop/  using ps 1.6.1.4 and Leo Wooden theme.

 

Has there been a fix to get the product reviews working again.

 

Cheers,

Nick

Link to comment
Share on other sites

  • 2 weeks later...

One would think that Prestashop would have properly addressed this issue by now... and one would think that only a rogue module or theme would break any other piece of code... but alas, I suppose they would rather SELL you a different loyalty points module than fix the code that is part of the core.

Link to comment
Share on other sites

i don't think this problem exists anymore in the default bootstrap theme.  If you bought a theme that was made early on in 1.6 and they used the presta code when the bug was there, then you will be seeing the problem now.  You should contact your theme developer so they can update their theme.  It is not a core issue it is a theme issue.

Link to comment
Share on other sites

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

Greetings..

 

I just updated from PS1.6.0.14 to PS1.6.1.16. I am using Panda theme (it is awesome).

I deleted Loyalty module v1.2.7 and reinstall v1.2.9 found here:

https://github.com/PrestaShop/loyalty

*you need to change the loyalty-master to loyalty, zip it and install in back office.

 

Then I tried to debug the "No reward points for this product." issue.

I changed the wordings to see if the correct tpl is called, that's how I do on my first debugging. I noticed those I modified did not reflecting. Then I remembered a theme can also override whatever tpl is in there. 

Turns out, my /themes/panda/modules/loyalty/views/templates/hook/product.tpl is the cause. Not sure why.

So I removed the whole loyalty folder from the themes folder. 

 

Problem solved!

  • Like 1
Link to comment
Share on other sites

Greetings..

 

I just updated from PS1.6.0.14 to PS1.6.1.16. I am using Panda theme (it is awesome).

I deleted Loyalty module v1.2.7 and reinstall v1.2.9 found here:

https://github.com/PrestaShop/loyalty

*you need to change the loyalty-master to loyalty, zip it and install in back office.

 

Then I tried to debug the "No reward points for this product." issue.

I changed the wordings to see if the correct tpl is called, that's how I do on my first debugging. I noticed those I modified did not reflecting. Then I remembered a theme can also override whatever tpl is in there. 

Turns out, my /themes/panda/modules/loyalty/views/templates/hook/product.tpl is the cause. Not sure why.

So I removed the whole loyalty folder from the themes folder. 

 

Problem solved!

Following this procedure with the removal of the js file /themes/panda/modules/loyalty/js/loyalty.js seems to have resolved all of my issues with this module.

THANK YOU sandrayin !!!!!!!

Link to comment
Share on other sites

Don't forget to also check any js files override by your theme at

 

/themes/[theme]/js/modules/loyalty/js/loyalty.js

 

If you removed all override files from the theme, the module 1.2.9 should work up to 1.6.1.16.

Hi Sandrayin,

 

I followed your instructions and remove both loyalty folders in modules and in JS, the loyalty points still calculating based on the highest combination on product page, and points doesnt change whatever which combination Im choosing. Any ideas

Link to comment
Share on other sites

Hi Sandrayin,

 

I followed your instructions and remove both loyalty folders in modules and in JS, the loyalty points still calculating based on the highest combination on product page, and points doesnt change whatever which combination Im choosing. Any ideas

I didn't realized this problem earlier. I am also facing this issue. Looks like this is a bug from the module itself. Haha. Someone need to file request to fix this bug in the github link.

Link to comment
Share on other sites

I didn't realized this problem earlier. I am also facing this issue. Looks like this is a bug from the module itself. Haha. Someone need to file request to fix this bug in the github link.

Actually, I too have the same problem... and you are correct that omitting all files from the theme leaves no other possibility than an error within the module itself, but good luck getting it fixed by Prestashop.

Link to comment
Share on other sites

Hi all, update, if you need to hide the sentence in product page in catalog mode, simply add this condition in your loyalty.tpl file:

 

{if !$PS_CATALOG_MODE} ... {/if}

 

This will work if you have certain customer group hidden price as well. Good luck.

{if !$PS_CATALOG_MODE}
<p id="loyalty" class="align_justify">
	{if $points}
		{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}
		{if isset($no_pts_discounted) && $no_pts_discounted == 1}
			{l s='No reward points for this product because there\'s already a discount.' mod='loyalty'}
		{else}
			{l s='No reward points for this product.' mod='loyalty'}
		{/if}
	{/if}
</p>
<br class="clear" />
{/if}
Link to comment
Share on other sites

  • 5 months later...

I found that in some themes JS this sentence is used:

Look for themes/yourtheme/js/modules/loyality/loyality.js or something similar. You can use debug tools of browsers.

updateLoyaltyView(parseInt($('#our_price_display').text()));

Which produces error in some currencies.

So, changed it to this:

updateLoyaltyView(parseInt($('#our_price_display').attr("content")));

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...