Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, I'm trying to redeem a coupon created in the back office for the basket. The coupon is
but when I then do
if (!string.IsNullOrEmpty(offerCode)) { var result = this.Basket.GetCheckoutManager().Offer.RedeemCouponOffer(offerCode); }
I get
Anyone know any reason why this is?, I've tried everything I could think of
First of all, inspect the object when it breaks on the error and find out exactly what is null. Also, double check the offer code.
Simon
Hi Simon, I did check the error. It seems like the error is happening inside the "RedeemCouponOffer" Method which I cannot access
That's the beauty of open source - you do have access to it ;)
https://github.com/Merchello/Merchello/blob/v2.5.0/src/Merchello.Web/CheckoutManagers/BasketCheckoutOfferManager.cs#L56
Not sure if the offer codes are case sensitive so check that also but I am pretty sure they are not and if the code is not recognised it shouldn't throw a null exception.
Perhaps clone the source code and step through the process to get more detail?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Offer Coupon Error
Hi, I'm trying to redeem a coupon created in the back office for the basket. The coupon is
but when I then do
I get
Anyone know any reason why this is?, I've tried everything I could think of
First of all, inspect the object when it breaks on the error and find out exactly what is null. Also, double check the offer code.
Simon
Hi Simon, I did check the error. It seems like the error is happening inside the "RedeemCouponOffer" Method which I cannot access
That's the beauty of open source - you do have access to it ;)
https://github.com/Merchello/Merchello/blob/v2.5.0/src/Merchello.Web/CheckoutManagers/BasketCheckoutOfferManager.cs#L56
Not sure if the offer codes are case sensitive so check that also but I am pretty sure they are not and if the code is not recognised it shouldn't throw a null exception.
Perhaps clone the source code and step through the process to get more detail?
Simon
is working on a reply...