1

Is it possible to have client specifik prices for products in Commerce? This should be an option with specific clients that has an agreement with the company. Everyone else will pay the ordinary prices.

1

Yes, it's possible. I would recommend using role based pricing. Customers who deserve the special pricing should be given a specific user role. Then on the product type, add a secondary price field used specifically for users with that role. Finally, add a product pricing rule that checks to see if the order owner (i.e. commerce-line-item:order:owner) has the user role. If so, you should swap in the price value from the secondary field using "Set the unit price to some amount" and fetching the secondary price using the appropriate token. Remember that you'll have to first run an "Entity has field" condition on the line item to find its product reference field and again on the product to find its secondary price field.

  • So if the prices are unique to each client I need a unique role for every client that this applies to, am I correct? – lovelainen Oct 20 '14 at 6:55
  • If that's the goal, then yes. That being fairly impractical, I'd suggest some alternate method of assigning individual prices to individual users. For example, perhaps each user has a unique percentage discount? You could use a hidden field on the user account that you use to modify product prices. – Ryan Szrama Oct 21 '14 at 0:53
  • Yes I think that is the way to go. It could possibly be a different percentage for different product groups but anymore detailed than that would be too impractical. Thanks for your suggestons! – lovelainen Oct 21 '14 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.