Filtering out, out-of-stock products from BonusDiscountLineItem demandware

348 Views Asked by At

By default BonusDiscountLineItem.bonusProducts will return out of stock products as well, is there any way to filter out the out of stock products from bonusProducts list?

1

There are 1 best solutions below

0
On BEST ANSWER

We can filter out the list returned by BonusDiscountLineItem.bonusProducts.

We can us IsOrderable() and IsInStock() methods for filtering out the OUT OF STOCK products.