Magento - How to restrict customer can buy only one product for specific category

by Lavanya   Last Updated January 11, 2019 12:09 PM - source

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.

Tags : php


Answers 1


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.

enter image description here

D3ad L0cK
D3ad L0cK
January 08, 2016 06:47 AM

Related Questions