Discount and coupon 100% off of for only 1 item in shopping cart I am using Drupal 7 with the 2.x version of the Coupon and Discount modules.

I am attempting to issue a 100% discount (free item) to my users, but I want to apply it only to 1 item in the cart. This way, 1 item is free but anything else is still full price. I want each user to be able to choose any item they want.

I would like the user to be able to browse the site for 1 item and, at checkout, apply the coupon code so that the item is free. To prevent people getting every item for free and adding many items to the cart, I would like the coupon to only apply to one item in the cart.

Is there a way to give each user the ability to get an item free?
You could use the Flag module to get this to work, by configuring an appropriate (non-global) flag, which you should then use to (automagically) flag a user after such user applied (for the first time) the coupon code at checkout. To actually flag such users, you should use the Rules module, which integrates extremely well with the Flag module. All that's left is to find the appropriate Rules Event for such rule to be triggered (somewhere along the lines of "checkout completed" I would assume).

Any time a user tries to apply such coupon code, you can then verify if it is the very first time, or yet another time. For this verification, all you'd have to do is use a Rules Condition to check "has this user yes or no been flagged already (by the flag you created for this purpose)".

If you're not familiar with the Flag module, checkout either of these:


The set of 8 video tutorials about the Flag module.
Flag's Community documentation.