We currently have an issue where 'Buy X number of Items get cheapest free'.
Scenario - Buy 3 Items get cheapest free:
We add items, all of which are in the same campaign, Item A($10) to the cart, then Add Items B($6) and C($5). to which item C($5) is now free. This works fine.
We continue our shopping and then add Item D($3), from the same campaign, but the discount does not apply to the cart correctly as it still keeps the discount on Item C. We end up getting something looking like this:
I have tried to the IPromotionEngine.Run(current) before rendering the cart items and I also done a cart.ApplyDiscounts(), but that did not work and somehow the discount still applies to the incorrect 'cheapest' item.
If we remove Item C from the cart, only then does Item D become free.
Has anyone come across this?
It is actually correct behavior. When you have "Buy 3 get cheapest for free", then the items in cart will be grouped by groups of 3, and the cheapest item in each group will be free.
Otherwise, if a customer buy 4 items with 10, 10, 10, 1 price, why would they even want to add the $1 item?
Thanks for the response. I did the exact same scenario (added 4)above and then proceeded to remove 2 items from the cart including one that was for free(as I changed my mind) and then added another item to make it 3 again and it did not apply the promotion. In the below screen shot, the one for $9.99 is the one that I am now suppose to get for free. You mentioned that the Promo engine groups the items, does this grouping stay in place until you remove all items from the cart for that campaign? Is there a way to reset that on add or remove from cart?
I think it was not reapplying the get free items promo because I had another item in the cart from a different campaign(Now $5 campaign) as seen in the screenshot below. Once I removed that item, refreshed the screen then the $9.99 item became free. That leads me to another dilemma, why would it be doing that? I dynamically import the promos from and ERP system and I do not set the ExcludedItems list.
It does not hurt to check that your promotions are not actually excluding each other, right? Just to be sure
I just deleted all promos and re-imported. Seems to be okay now. Thanks a lot for your help as always!