Page 1 of 1

OfferCode is not deleted when not applicable

Posted: Sat Sep 07, 2013 4:22 am
by a3k628
Hi,

Our company started using broadleaf recently and I am working on promotion engine. We support promotions through offer code.

So I started checking the related code and found that from broadleaf cart controller when a offer code is added, OfferActivity gets invoked through pricing workflow. But this activity does not seem to take responsibility to remove the offer code added to a order when it is found to be not applicable in filterItemLevelOffer.

Is there code anywhere else that takes care of removing xref between offer code and order when it is not applicable? Or promotion engine has to be modified by me to take care of this?

Re: OfferCode is not deleted when not applicable

Posted: Sun Dec 01, 2013 12:16 am
by bpolster
That would be a customization. Just because an offer code is not currently applicable, the system does not assume it will not be. For example, if someone were to add additional products to the cart.

While it makes sense that the system might cleanup the offer codes on the order after it has been submitted, this would not be a high priority for our team.

The record of what offers are actually applied to an order is in the form of the Adjustment entries (e.g. OrderAdjustment, OrderItemPriceDetailAdjustment)