Commerce - Hide Add-to-Cart form from Anonymous users
From the link : http://www.drupalcommerce.org/node/2528 with an condition for anonymous user added.


  It's taken me a while but I've finally cracked it! I've used
  hook_form_FORM_ID_alter() (that took me some learning and meant I had
  to create my own, admittedly trivial, module!). So in my module I've
  got the following which sets #access for the submit form to false
  which stops it being rendered (see
  http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc...).
  
  In the future, I'll be able to extend this to disable the button on
  certain conditions (say when there's no stock but I want to show what
  combinations are possible). It would also presumably be an easy way of
  changing, say, the text for the button, such as "Buy" instead of "Add
  to cart".


  function mymodule_form_commerce_cart_add_to_cart_form_alter (&amp;$form, &amp;$form_state, $form_id) {
global $user;
    if ($user-&gt;uid == 0) {
    // Disable the Add to Cart submit button


  $form['submit'] = array('#access' =&gt; FALSE);
        }    
    }