Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Promotion number of redemptions

Vote:
 

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) :Wanted functionality

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 }.

Any help is greatly appreciated.

#201517
Feb 21, 2019 14:59
Vote:
 

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

#201537
Feb 22, 2019 8:59
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.