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 :)
[discount coupons] List available coupons
Hello,
It's possible to have access to all available coupons (through the code) ?
Thank you
You can get all active coupons from OfferSettingsService, which is exposed through the MerchelloContext:
Hello,
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?
Thank you!
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...