I am constructing a site that will serve mainly agents (authenticated users), but should still show all of the products (without prices) for anonymous users. When logged in, only agents should see the Add-to-Cart form on the product display page, and anonymous users should instead see a link to an "Ask a Question" page.
Is this possible? I looked through the permissions table and could not find a way to prevent access to the cart form by anonymous users.
The only thing I can think of doing is customizing my node--product-display.tpl.php
file:
<?php
if ($logged_in) {
print render($page['content']);
} else {
// something else
}
?>
I'll have to print the rest of my fields out manually, but as far as I know, this is the only way to print the Add to Cart form. I'm a bit uneasy about this, so I'm humbly looking here for another solution. thanks