I had a similar question here, http://www.drupalcommerce.org/node/2528, and used hook_form_FORM_ID_alter() to solve it. If you can work out if your user is logged in, then the same technique should work.
I used field permissions for the product reference permissions to hide for anonymous, and two separate pages in my views 1 with access to authenticated to show the cart and other page without the cart (overridden of course) and a nice little global header stating you gotta log in sucka.
this took me all of 2 hours to setup and get started with commerce. I just switched from ubercart which I had problems the last two weeks with hiding price / cart cleanly. +1 commerce off the bat! let's see how this 5,000 product import goes.
A little off topic, but why hide add to cart? Personally I get irritated when an online shops request me to login.
It is like standing in a brick and mortal shop at the register and the salesperson tells me to hand in all kind of information before I am allowed to buy.
Comments
Try hook_form_FORM_ID_alter()
I had a similar question here, http://www.drupalcommerce.org/node/2528, and used hook_form_FORM_ID_alter() to solve it. If you can work out if your user is logged in, then the same technique should work.
hide add to cart button commerce
I used field permissions for the product reference permissions to hide for anonymous, and two separate pages in my views 1 with access to authenticated to show the cart and other page without the cart (overridden of course) and a nice little global header stating you gotta log in sucka.
this took me all of 2 hours to setup and get started with commerce. I just switched from ubercart which I had problems the last two weeks with hiding price / cart cleanly. +1 commerce off the bat! let's see how this 5,000 product import goes.
Details?
Would you mind giving a little more details?
I've downloaded and installed Field Permissions module, what do I do from there?
Thanks in advance
Erik
Found help!
On one of the documentation pages:
http://www.drupalcommerce.org/user-guide/cart
1 minute and it's gone!
what part in doc,..i still
what part in doc,..i still not found it..
A little off topic, but why
A little off topic, but why hide add to cart? Personally I get irritated when an online shops request me to login.
It is like standing in a brick and mortal shop at the register and the salesperson tells me to hand in all kind of information before I am allowed to buy.
Perhaps there are good reasons to do so, however.