I have added the following code,
Collection matchingCommerceItems = qualifier.findQualifyingItems(
getPriceQuotes(order), order.getCommerceItems(), promotion,
profile, null, order, order.getPriceInfo(),
hardGoodShippingGroup, hardGoodShippingGroup.getPriceInfo(),
null);
if (null != matchingCommerceItems && matchingCommerceItems.size() >
0) {
applicable = true;
} else {
applicable = false;
}
MatchingObject matchingOrder = qualifier.findQualifyingOrder(
getPriceQuotes(order), order.getCommerceItems(),
promotion, profile, null, order, order
.getPriceInfo(), hardGoodShippingGroup,
hardGoodShippingGroup.getPriceInfo(), null);
if (null != matchingOrder
&& null != matchingOrder.getMatchingObject()) {
applicable = true;
} else {
applicable = false;
}
when the promotion i'm testing is Item Discount - Percent Off and the
sku is IN the order matchingCommerceItems has the item that matches,
however when i use that same discount and the sku is NOT in the order,
matchingOrder still returns the order object. Can you please explain
why the order still matches even though the promotion does not
specifically apply to it?