Hide add to cart button for specific products/customers

Is it possible to disable or hide add to cart button for specific customers or products?
I know that you could disable add to cart from admin configuration, but it disables add to cart for everyone.

I am using latest Algolia’s Magento 1.x extension.
Thanks to all.

1 Like

You have to add an attribute that defines that, and then check it in the template.
We use price, for simplicity, so when price is 0, no add to cart button is shown.


For customers, you will have to update the attribute via a custom Javascript hook that uses transformData before rendering the results.

1 Like