webTester,Thank you for your response. I agree. Thanks for the tips on code to review. I'll start there.
I've been looking through the code and have come up with the following concept. Please review and let me know if this seems reasonable:
Modify code on CatlooKnetStore.Library/CodeBehind/ShoppingCart.apx.vb as follows:
objCartPrice = objCartPrices.GetCartPrice(UserId, GetShipToID, PortalId)
CouponCodes = CouponCodes.Replace(ControlChars.CrLf,
arrCoupons = CouponCodes.Split(delimiter.ToCharArray)
CouponAmount = Convert.ToDouble(Amount)
newCouponCodes = newCouponCodes.Remove(StartIndex, CharsCount)
newCouponCodes = newCouponCodes.Remove(StartIndex, CharsCount + 2)
objModuleController.UpdateModuleSetting(ModuleId,
CouponAmount = (Convert.ToDouble(Amount) / 100) * OrderSubTotal
Does this look like I'm on the right path?
Just realized I forgot to strip the '%' from the amount value
Amount = Replace(Amount.ToString,
Great work! There is only a problem if someone deletes something from his cart or changes the quantity of items. In this case the coupon discount amount should be updated. We will add this to the coming versions.
So I'm in the right place and on the right path? I'll check out adding some more coupon handling to the cart update event.
Glad to hear you'll be adding this to the next release.