It's hard to believe that this hasn't been done before, but I can't find any information or documentation on how to accomplish this.
If there are multiple items in the cart that share an attribute, I want to have a coupon code that will make only one item in that collection free. (preferably lowest cost item, but i'll settle for just "first" in whatever order)
Ex. (custom attribute is color
)
- Item 1 color=red $5.99
- Item 2 color=blue $6.99
- Item 3 color=blue $7.99
- Item 4 color=green $8.99
- Item 5 color=blue $9.99
SubTotal = $39.95
Coupon would be to the effect of "first blue item free", and after applying, it would look like the following
- Item 1 color=red $5.99
- Item 2 color=blue $0.00
- Item 3 color=blue $7.99
- Item 4 color=green $8.99
- Item 5 color=blue $9.99
Is anyone aware of an extension that covers this?