Developer forum

Forum » Development » PromoCodeChecker.CheckOrderPromoCode method

PromoCodeChecker.CheckOrderPromoCode method

Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi there,

First time using this method and have a couple comments/requests:

1) When looking to a voucher code - CheckVoucherLists() - it doesn't check if the voucher list is inactive and returns a valid voucher code.

2) When looking Order Discounts & Sales Discounts - CheckDiscountMatrix() & CheckSalesDiscounts() - it only checks for OrderFieldValue property. Would be possible to also look for Voucher List option taking the previous point into consideration?

Thanks in advance,
BR, Mario


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

@1: Added that, out in 9.6

@2: That would be a bug - since the CheckOrderPromoCode method checks the list, the order discounts and then the sales discounts. So the CheckDiscountMatrix() & CheckSalesDiscounts()  should only check the voucher field on the discounts.

Votes for this answer: 1
 
Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi Nicolai,

Regarding #2 - Yes that's correct. But if we specify the PromoCodeType parameter to only look for order discounts or sales discounts, it won't check discounts that are associated to a voucher list.

BR, Mario

 
Nicolai Pedersen
Reply

You have the source code - change it if you have other requirements.

BR Nicolai

 

You must be logged in to post in the forum