I'm looking for a way to fetch the current number of redeemed elements for a promotion, similarily to what is displayed when listing the different Campaigns in the admin-panel as displayed here (the Redemptions column) :
I have tried with
var redemptionImitator = ServiceLocator.Current.GetInstance<IRedemptionLimitService>();
var limitNumber = redemptionImitator.GetRemainingRedemptions(new List<PromotionData>() { PromotionDataElement }, cart.CustomerId, cart.GetFirstForm().OrderFormId);
but with no luck. The afformentioned approach always returns a { Count: 1 }.
You can use PromotionInformationRepository.GetRedemptions(IEnumerable<Guid> promotions) for such purpose. The parameter is a collection of ContentGuid from the promotions you want to get the redemptions
Hi,
I'm looking for a way to fetch the current number of redeemed elements for a promotion, similarily to what is displayed when listing the different Campaigns in the admin-panel as displayed here (the Redemptions column) :
I have tried with
but with no luck. The afformentioned approach always returns a { Count: 1 }.
Any help is greatly appreciated.