title: Hide the "addtocart'" button in Virtuemart for not logged in users
body: <p>I am trying to customise a Virtuemart Template in order to hide the ADD TO CART button only for users who are not logged in or unregistered. 
  I am using Virtuemart 2.0.x and Joomla 2.5.x</p>
  
  <p>I have added this code in the "default_addtocart.php" file after line 122: (/templates/MYTEMPLATE/html/com_virtuemart/productdetails/)</p>
  
  <p>after this code:</p>
  
  <pre><code>            &lt;span class="addtocart-button"&gt;
              &lt;?php echo shopFunctionsF::getAddToCartButton ($this-&gt;product-&gt;orderable); ?&gt;
  </code></pre>
  
  <p>I have added this code:</p>
  
  <pre><code>        &lt;?php if ($_SESSION['auth']['user_id'] = 1) { ?&gt;
              &lt;style type="text/css" media="screen"&gt;
              .addtocart-area, .addtocart-bar, .quantity-box, .addtocart-button { display:none;}
              &lt;/style&gt;
  </code></pre>
  
  <p>This makes the "addtocart" button to be hidden, but for all usergroups, regardless if a user is logged in or not. </p>
  
  <p>Any help is much appreciated. 
  Thanks</p>