Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have experimented with D7 Commerce Kickstart and I have 2 feature requests:
My products have 3 prices: "price", "retail price" and "export price".
Depending on his user role, a user will see one of these prices.
For some products I do not want to display a price, only retail and export price, for example.
Since the price is a required field, a value must be entered.
So my feature requests are:
- Possibility to hide "price" and "add to cart" per product.
- Price per user role.
I think that these features are highly requested since I have found several discussions about them.
Thank you.
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedYou have indicated 8.x-2.x-dev as the version. Is this feedback for the Drupal 8 version, or was that a mistake?
Comment #3
tomsm CreditAttribution: tomsm commentedFirst I tried 8.x-2.x-dev and then D7 Kickstart to investigate what the possibilities are regarding prices per role.
Since Drupal 8 has better multilingual support, I prefer to create my site with D8.
So, it is a feature request for the D8 version.
Comment #4
bojanz CreditAttribution: bojanz at Centarro commentedThanks for the clarification.
The price field is no longer required in 2 .x.
The price and add to cart form can be removed on per product type basis.
Doing it per-product is something we're leaving to a contrib module. It's a field and a hook, not a lot of work.
Price per role is done by https://www.drupal.org/project/commerce_pricelist in D7 and it will stay in that module for D8.
Comment #5
tomsm CreditAttribution: tomsm commentedThanks for your answer.
I have another similar question:
Will it be possible in 2.x to hide prices from anonymous users?
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedSure, with a custom module. Nothing's changing there compared to 1.x
Comment #7
tomsm CreditAttribution: tomsm commentedIs it possible to use the module field permissions (if a D8 version will exist) to hide the price and/or the add to cart field?
Because I want to do the following:
Right now I have a D6 site which does all that (with CCK3 and field permissions), but it does not have a commerce function. Now I want to have real commerce site with the same price functionality.
Is it possible to achieve this with Commerce 2.x and a custom module?
I am sorry that I have so many questions, but I am trying to figure out how to rebuild my site.
Comment #8
bojanz CreditAttribution: bojanz at Centarro commentedYes, field_permissions should be able to do the hiding per role.
Price per role is commerce_pricelist.