Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Hi,
It's unsual to have SKUs without price. I think the problem comes from this (ApplyItemDiscount in CalculateDiscountsActivity):
// Calculate percentage off discount price if (totalAmount > 0) { percentageOffTotal = record.PromotionReward.AmountOff / totalAmount; // but since CostPerEntry is not an adjusted price, we need to take into account additional discounts already applied percentageOffTotal = percentageOffTotal * (totalAmount / record.AffectedEntriesSet.TotalCost); } else { percentageOffTotal = 100m; } discountAmount = record.PromotionReward.AmountOff;
In your certain cases record.AffectedEntriesSet.TotalCost can be 0 and cause the problem.
You don't have to implement your own CalculateDiscountsActivity, just download the source code package, build it, debug and the fix it.
Regards,
/Q
Allright, i integrated Mediachase.Commerce.Workflow into our solution and made some customization. I guess i need to be awaik if Episerver updates this package then...
Hello!
After upgrading from Commerce 8.15 to 9.8.1
I do get "Attempted to divide by zero" error on CartPrepair and CartCheckOutWorkflow (ApplyItemDiscount in CalculateDiscountsActivity), The error is when i have a promo 100% of order value.
This is suppose to be fixed in version 8.2 and it seems that i don't have this problem in version 8.15.
http://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=118529
Any work around or configuration that i'm missing?
Should i implement my own CalculateDiscountsActivity?
MetaInfo: Some product skus may not have any price at all
Regards