I'm usign the SpendAmountGetGiftItems promotion. If I spend 5000SEK I get two items for free. When I pass 5000SEK the items are added to the cart, fine. But then I try to remove them but they keep coming back.
I guess what happens is that I remove it, and the the workflow recalculates the cart and finds out that I reached 5000SEK, looks for this items and it is not there, add it again.Am I right or am I missing something?
Yes, that's the expected behavior. Why would you remove the gifts item from the cart?
Well, no reason actually besides that maybe I don't want the gifts. This way I have no choice. It is just that as a user you might get comfused when trying to remove something that keeps coming back. I guess the best behavior in that case should be that the we don't show a "remove" icon for these cart items.
Thanks again Quan!
Can I tell which products have been added by this promotion so that I treat them differently?
One possible way is to look into the RewardDescription returned by IPromotionEngine.Run. If there is any promotion of type SpendAmountGetGiftItems, look at its GiftItems property - it'll give you the list of items given as gift.