Price levels

I am trying to build private eshop for closed groups of our customers. We have 4 different price groups. All customers must have price level set, all products have 4 different price values. Customers and products are imported from external CRM by Feeds.

I am not sure how to design data structures and how to automaticaly choose correcs price depending on the customer's group.

Maybe create 4 price fields on product entity and somehow choose price by Rules on "Calculating the sell price of a product"? How?

Posted: Feb 13, 2012


balintd on February 16, 2012


I think you need to use Rules and user roles for this. One solution could be creating 4 price fields and then create a rule that will change the price of the product to price 2 if the logged in user has role 2, if she has role 3, then change the price to price 3 and so on.

In brief:
Event: Calculating the sell price of a product
Conditions: You have to examine if the user has for example role 1
Actions: You have to set the unit price to a specific amount, and that specific amount should be the data from the price 1 field.

That means 4 rules for the 4 user roles and prices (or 4-1 actually).

Let me know if this seems like a good solution for your situation and I'll help you with this further if you need it.

With this solution you can have 4 columns in your csv for feeds also.

Bobík on February 16, 2012

Thank you for your idea.

But, I have one problem. Orders are created by our administrators, not by customers (I can't use Logged in user). I have to load customer entity in rule on event Calculating the sell price of a product.

dianikol on February 21, 2012

I think that when your administrator make an order for customer X a new order will be created with the admin as a buyer. That's your situation. right?

Combining VBO and Rules you can create a component that changes the owner of the order by passing into this component a parameter which is the preferable user.

I hope that helps