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
It's possible to have access to all available coupons (through the code) ?
You can get all active coupons from OfferSettingsService, which is exposed through the MerchelloContext:
Thanks for your reply, Ive done that but it returns an empty list.. and I have one active coupon.
when I use MerchelloContext.Current.Services.OfferSettingsService.GetByOfferCode("40SUMMER") it finds and returns that coupon.
Do you have any idea why is it not working?
Does that function gets all active coupons or only the ones being applied to the current basket?
The GetAllActive() method takes an optional parameter excludeExpired that defaults to true. Try setting it to false if you want to get all active offers regardless of expiration status.
And yes, it gets all active offers, not just the ones being applied :)
thank you but it doesnt work :( it's still empty..
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted