Developer forum

Forum » Development » Wrong loyalty calculation

Wrong loyalty calculation

Anders Ebdrup
Anders Ebdrup
Reply

Dear Dynamicweb,

 

The point calculation in DefaultPointProvider does not take the user, the quantity or tax into account in the method: FindPoints.

This line:

                Dim productPrice As Double = PriceManager.GetPrice(product, order.Currency.Code, order.VatCountry.Code2, orderLine.UnitId, 0).Price


Should be replaced by (or some more nice code):

                Dim productPrice As Double = CType(PriceManager.FindPrice(product, orderLine.Quantity, False, order.Currency, orderLine.UnitId, _user, order.ShopId), PriceRaw).Price

 

Can you please look into this?

 

Best regards, Anders


Replies

 
Nicolai Pedersen
Reply

Will research and get back to you!

 
Morten Buhl Dynamicweb Employee
Morten Buhl
Reply
This post has been marked as an answer

Bug confirmed. Registered as 86022 and 86023

 

/Morten, DW

Votes for this answer: 1
 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Morten,

 

Sounds great! When can we expect a fix? Our client is going live with this solution next week.

 

Best regards, Anders

 

You must be logged in to post in the forum