20% site wide discount and total price calculation

Vote:
 

I have a potentially weird on for you all....

Scenario: A customer purchases 3 of a $14.99 product with a 20% discount, how much should they be charged? _


*How Episerver calculates the price:*


1.    Calculate the discount: $14.99 x 20% = $2.998
2.    Calculate the price after discount: $14.99 - $2.998 = $11.992
3.    Determine the price for 3 of these items: $11.992 x 3  = $35.976
4.    Round to the nearest penny: $35.976 --> $35.98 
5.    Final Price: $35.98


*How our cusotmer expects the price to be calculated:*


1.    Calculate the discount: $14.99 x 20% = $2.998
2.    Calculate the price after discount: $14.99 - $2.998 = $11.992
3.    Round to the nearest penny: $11.992 --> $11.99 
4.    Determine the price for 3 of these items: $11.99 x 3  = $35.97
5.    Final Price: $35.97

This is what is happening.  We tell the customer that the product was $14.99 but with their $3.00 savings (2.998 rounded up) the price is now $11.99.  Customer does the math and 11.99 * 3 is 35.97.  They don't realize there is an additional .002 they don't see.  So when Episerver calculates the price it is 11.992 * 3 is $35.98.  Customer now assumes they are overcharged by one penny.

Not a huge deal, but we are sending these orders to a third party system to have them fullfilled and they recheck the math.  This third party system also calculates out the total to be 35.97.

Is there ayway to tell Episerver Commerce (version 8 right now) when to use the thousandths place for rounding?

#141435
Nov 16, 2015 3:29
Vote:
 

Hi,

I think you can customize the workflows to get the precision you expect. One place would be CalculateDisscountsActivity.ApplyItemDiscount method

Regards,

/Q

#141442
Nov 16, 2015 10:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.