Hello again, Sumit,
I believe I found the culprit. It basically came down to a single word (!) that needed to be removed. I compared various promotion-related files with the versions from our old 4.1 site and found that it apparently was a rounding issue. Changes were made in 2016 to the rounding logic included in model/dao/PromotionDAO.cfc whereby:
<cfset querySetCell(orderItemDiscountsQuery, "salePrice", orderItemDiscountsQuery.originalPrice - ( orderItemDiscountsQuery.originalPrice * (orderItemDiscountsQuery.amount / 100) ), orderItemDiscountsQuery.currentRow )>
was updated to:
<cfset querySetCell(orderItemDiscountsQuery, "salePrice", precisionEvaluate(orderItemDiscountsQuery.originalPrice - ( orderItemDiscountsQuery.originalPrice * (round(orderItemDiscountsQuery.amount / 100)*100)/100)), orderItemDiscountsQuery.currentRow )>
I removed "round", retained the later precisionCalculate updates and changed the above to:
<cfset querySetCell(orderItemDiscountsQuery, "salePrice", getService('HibachiUtilityService').precisionCalculate(orderItemDiscountsQuery.originalPrice - ( orderItemDiscountsQuery.originalPrice * (orderItemDiscountsQuery.amount / 100)*100)/100), orderItemDiscountsQuery.currentRow )>
If there is any problem with us making this change, that you foresee, please let me know, but this appears to have done the trick. Making this change also resolved another promotions issue we discovered a few days ago when a promotion was percentageOff and the percent was set to 50 or above. The resulting cart showed a 100% discount, for some strange reason.
In any event, I guess I am the only one on this version of Slatwall, as the above "round" code is included in the latest version of PromotionDAO, as well, and no one else seems to be having this issue, but I wanted to post my findings, in case it might still help someone. The issue must be our version of Lucee, which is not the latest, by any means.
Thank you again,
Theresa