cart functions only for specific role
Hi,
I am building a new site that i need to allow ONLY wholesaler to be able to add to cart items and checkout however all other users can only view the products but not have any cart functions including not to show the add to cart button for them.
how can this be achived?
i changed the settings that all new accounts need to be approved (so i can control who is a wholesaler etc...)
please let me know.
Thank you
Comments
You can start here
Hi
Check these:
http://www.drupalcommerce.org/discussions/2623/hide-add-cart-button-guests
http://www.drupalcommerce.org/user-guide/anonymous-carts-and-logged-users
http://www.drupalcommerce.org/discussions/2528/how-do-you-remove-add-car...
Thanks
thank i used the field
thank i used the field permission module which takes away the add to cart functions by role however the price is not working, it wont disappear. any ideas?
Check this
Hi
Check these:
http://www.drupalcommerce.org/discussions/2871/hide-price-anonymous-user
http://www.drupalcommerce.org/questions/3354/hide_price_anonymous_users
Thanks
wow much better the database
wow much better the database edit worked great i made teh change then i block it again in the database. much better than my solution, i reverted everything back to the above solution.
thanks
well what i did was i created
well what i did was i created a new text field and i edited the node.tpl file that it should show the new text field. then i took the body text field which is by default only 3 lines and i put in there a second time the price for the wholesaler (of course also in the regular price field so the system can calculate the price). then i was able to allow only authenticated users to see the "BODY text" which is the price and i hide all together the price field from being viewed. so this accomplished what i needed, as the module field permissions doesnt allow you to change the price field but it does allow you to change the body field by role permission!
thanks for the help with this module.
simple instruction
for all those who want simple instruction and not have to read one million things like i did. here you go 7 easy steps, takes a few minutes:
1. Install module field permissions
2. To unlock your price (for next step) you can go to your database -> table field_config -> edit commerce_price entry to change "locked" from 1 (enabled) to 0 (disabled)
3. Go into /admin/commerce/config/product-variation-types/product/fields/commerce_price and change that only authentic users can view price.
4. When done, go back to step 2 and put back 1 to enable the block!
5. Then to go /admin/structure/types/manage/product-display/fields/field_product this is for the add to cart button and select show only to authentic users.
6. Then go into /admin/people/permissions and select Access checkout and give permission only authentic users. (this will remove the checkout button in the cart if someone they got there)
7. Last step is to not show the cart nor its functions that are on the top right of the website and only show it to authentic users, this is a simple block to change so go to admin/structure/block/manage/views/shopping_cart-block/configure%3Fdestination%3Dnode scroll down to Roles and select the authentic and administrator roles, so only those roles will see this block.
hope this helps.
how to go to db in step 2?
your step 2, do u mean actually going to the database, If yes, could u be so kind to list out the steps.
if not, it is within drupal, could u tell me how to get to database. Many thks.