Magento 2 Hide Add to Cart for Specific Customers

NOTE: This feature is provided by Adobe Commerce (Magento Enterprise Edition) only.
When the Magento website is B2B and merchants do not want to allow some group of customers to purchase the items then Magento provides a feature to hide the add to cart button from the website for specific customers group.

Adobe Commerce provides “Category Permissions” feature to hide the add to cart buttons for specific customer groups or all.

Steps to hide add to cart for specific customers groups in Magento 2

Step 1: Navigate to Magento 2 Admin > STORES > CATALOG > Catalog
Step 2: Here open “Category Permissions” tab.
Step 3: In this tab, you can see the “Allow Adding to Cart” option to manage add to cart button visibility at the front end.

Magento 2 deny add to cart

Following are the 3 possible values you can select for the “Allow Adding to Cart” field.
Yes, for Everyone = Displays add to cart button for all the customer groups.
Yes, for Specified Customer Groups = Display add to cart buttons for specific customer groups. Once you select this option, you can see another multi-select option under this dropdown to select customer groups.
No = it will not allow add to cart for any customer group.

You can also hide add to cart button for specific categories and for specific customer groups in Magento 2 commerce cloud.

How to hide add to cart button for a specific category in the Magento 2

Step 1: Navigate to Magento 2 admin > CATALOG > Categories
Step 2: Select the category in which you wanted to hide add to cart button.
Step 3: Navigate to the “Category Permissions” tab.
From here select the customer group for which you want to hide add to cart button and then select “Deny” to “Add to Cart” as shown in the following screenshot and save that category.

Adobe Commerce Cloud Hide Add to Cart

I hope you have checked our previous blog post on how to clear customer shopping cart from the admin in Magento 2