Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.2
Component:
Price
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2017 at 11:01 UTC
Updated:
23 Jan 2018 at 09:27 UTC
Jump to comment: Most recent
Comments
Comment #2
bojanz commentedYou need to write a PriceResolver.
Like here: http://dev.studiopresent.com/blog/back-end/drupal-commerce-2-and-sale-price
Comment #3
zoraxthank's a lot it works !
Comment #4
bala.addweb commentedYou can use Commerce Pricelist for that. In further option;
- Load the product with commerce_product_load($product_id);
- Get User Role and decide Price for that.
- Change Unit price (commerce_price) of loaded product related to new decided price.
Hope this helps you.
Comment #5
bojanz commented@nikunj.addweb
You're replying to a D8 issue with D7 advice.
Comment #6
bala.addweb commentedPricelist is now available for Drupal 8.
For customization, you can get help from here
Comment #8
zoraxthanks for your answer, but I will try without pricelist (even if it sounds good ).
But I have another question, all prices displayed on the site are now function of the role user.
But When the administrator need to create order with certain price list based on the customer role how can I do that ?
I wonder if masquerade will do the job, but the administrator will have to switch between different connection it will be a nightmare...
I probably need to :
1 - alter the order form
2 - get the client role
3 - apply price of that role