I think it should be fairly simple to implement.
1. Search for all the files in “app/design/frontend/” directory that contain “getAddToCartUrl” link. Currently there are 11 files with 15 occurences.
2. Wrap the whole tag (<button> or <a>) in condition:
* $_product is optional, if you want to add product specific logic. You might omit it in your case.
* $_product might need to be replaced with $_item, depending on context.
* create a custom theme and put changed files there to allow future upgreadability.
3. Create your helper class and method:
It is possible to overload existing helper too.
class Mage_YourModule_Helper_Product extends Mage_Core_Helper_Url
public function canSell($product)
// Fetch currently logged in customer's group id
$loggedInCustomerGroupId = Mage::getSingleton('customer/session')->getCustomer()->getGroupId();
// Put your "cool" group id here.
$allowedGroupId = 2;
// Alternatively you could take it from configuration:
// $allowedGroupId = Mage::getStoreConfig('yourmodule/cool_customers/group_id');
// Validate button visibility
return $loggedInCustomerGroupId == $allowedGroupId;
To add configuration field, create app/code/local/Mage/YourModule/etc/system.xml by example from core modules.
There might be logical implication in other areas of the website, but this customization will give ability to control visibility of “Add to cart” buttons.