Developer forum

Forum » Development » Loyalty points cache on user

Loyalty points cache on user

Anders Ebdrup
Anders Ebdrup
Reply

Dear Dynamicweb,

 

We have issues with the PointBalance on the user, when creating multiple orders with the same user. Please see this screen dump: https://www.screencast.com/t/tPbdVpy4N4b

This causes issues as we use this method: "Dynamicweb.Security.UserManagement.User.GetCurrentUser(Dynamicweb.Security.UserManagement.PagePermissionLevels.Frontend).PointBalance" to decide the actual amount of points to be available in the cart - which is not available as that value is cached.

The right amount should be this: https://www.screencast.com/t/RgwET2OMZ

Can you please try to look into this?

 

Best regards, Anders


Replies

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Anders

Sorry about this. We have created TFS#86330 on this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt 

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Anders,

could you describe a bit more your scenario please?
The current user PointBalance really is cached, but this is correct.
All users point transactions are performed by LoyaltyService which updates cached balance.

As I see,  the only way to reproduce the problem - is to write direct update SQL instead use loyalty service API.

Best regards,
Vladimir

 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Vladimir,

 

We have located the issue to be related to missing rounding of the amounts. Kirkholt has registered the bug.

 

Thanks for looking into the issue.

 

Best regards, Anders

 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Vladimir,

 

We have looked more into this issue and can see that handling the PointBalance as a float in AccessUser gives critical issues as users are sometime not able to use their bonus.

Please find this screen dump: https://www.screencast.com/t/UDJGVtuftP1w

 

Best regards, Anders

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Anders,

We right now testing the feature #86580 "Loyalty points should always be awarded / spent as integers"

it should allow to avoid such problems.

 

Best regards,

Vladimir

 

You must be logged in to post in the forum