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.
Magento default didn't provide for free product in Shopping Cart Price Rules. You need to find a plug-in for this.
Here cheapest one that I used before.
This one is compatible up to Magento 1.9.2
Then, you can set free product based on which categories.