I am trying to add free product for specific category, Customer can add only one free product in the cart for specific category. I tried to add shopping cart price rule as
Condition: If total quantity less than 1 for a subselection of items in cart matching ALL of these conditions: Category is 5
Action: If ALL of these conditions are TRUE : Category is 5
But it doesn't work.
And I tried another way by custom coding: get total items by category, if it is greater than count of 1, show haserror message in cart page. This also not working, I don't know exactly where to put this calculation.
Any idea? Help me.