November Happy Hour will be moved to Thursday December 5th.

Add redemptions to promotion

Vote:
 

Is there a way to add redemptions to a Promotion from code? Have a system where promotions are shared and need to add redemptions "manually" from a scheduled job.

Regards

Mehrdad

#268479
Dec 16, 2021 9:28
Vote:
 

Yes

                promotion.RedemptionLimits.PerPromotion = int.MaxValue;
                promotion.RedemptionLimits.PerCustomer = int.MaxValue;
                promotion.RedemptionLimits.PerOrderForm = 2;

#268480
Dec 16, 2021 9:34
Vote:
 

Doesn't that just set the redemption limits? I need to add redemptions to a promotion not change the redemption limits.

#268483
Dec 16, 2021 9:50
Vote:
 

I see, then in that case, no. PromotionInformation which is used to determine the redemption is tie to a specific order form, you will gonna mess that order form promotion up if you add more entries to it.

You can, in theory, write your own RedemptionLimitService to return how many redemptions left for a specific order, other than its actually recorded number. However I don't know how your promotions are shared, so it could be tricky. 

#268500
Dec 16, 2021 11:14
* 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.