multiple prices per product


i need to have 2 different prices per product: one for the customer and one for the trader. the price for the trader is individual and not calculated by an discount.

i created a second price field so every product has now 2 price fields. commerce is still using the original price field to show the sellprice. but how can i set which user role has which price ??

does anybody have an idea for this? :)

Posted: Oct 14, 2011


maze on October 14, 2011

this manual is about discounts. but i dont have a calculatable discounts, i have two individual prices for each user role.

rfay Randy Fay on October 20, 2011

You can add extra price fields on your product for each role, and then use a rule to adjust the price to the role-based price with a product pricing rule.

milkovsky on February 8, 2012


Create the rule below:

Event: Calculating the sell price of a product
Condition: Entity has field Parameter: Entity: [commerce-line-item], Field: commerce_product
Condition: Entity has field Parameter: Entity: [commerce-line-item:commerce-product Field: field_price2
Condition: User: [site:current-user], Roles: выбираем роли, для которых цена.
Action: Commerce Line Item: Set the unit price to a specific amount: Parameter: Line item: [commerce_line_item], Value: [commerce-line-item:commerce-product:field-price2:amount]

Details are here(on drupal.ru - Russian Drupal community site):

Petr Illek on March 20, 2013

Thanks for this how-to, its function correctly. But I need litle change.
I have two prices for two user roles. For role1 I need the original price. For role2 I need the second price, but I need to show them the original one too. The above solution will change all the prices for role2 to second price.
How to do that? Its posible to make the rules calculation only in Cart and Checkout?
I try to add new condition Path has URL alias and use "cart" url, but with no avail.