1

I have some product pricing rules that adjust the price a customer will pay. How can I display this adjusted/calculated price to the customer? I want to display the calculated price like a field the way the base price is displayed.

  • Is there a field display setting (for example at /admin/structure/types/manage/product/display) that will do this?
  • Does it have to be done through rules (if so what event and actions should be used)?
  • What kind of "calculate price format" are you hoping for? You want some sort of relationship between your two price fields? – alec Jun 6 '18 at 17:37
  • you need rules module – pinueve Jun 6 '18 at 19:50
  • @alec yes, i want to show the exact amount of price field thagt generate with rules – soheil Jun 7 '18 at 9:10
  • Oh... you have rules (product pricing rules that run when calculating sell price of a product?) that calculate the price...(is that correct?) And it's that calculated price which you're trying to display in a field? – alec Jun 7 '18 at 11:58
  • yes exactly @alec – soheil Jun 7 '18 at 13:37
1

When a price field is rendered using the "Formatted price" display formatter, it has a setting for you to choose between displaying the original price as loaded or the calculated sell price for the current user. That second one is the default, so as long as you are using product pricing rules properly (as indicated in the comments), this should just work for you.

If for some reason it isn't you'll need to find and review your display settings for the price field on your various product types. Because the price field that appears on a product display comes from the product entity directly, you have to adjust its field display settings there instead of on the relevant node type. You should find them under Administration > Store > Products > Product types. Click the manage display link beside your product type and see what it says.

If you get stuck, feel free to join us in the #commerce channel in the Drupal Slack!

| improve this answer | |
  • 1
    Thanks for your answer,I'd like to join commerce channel. – soheil Jun 30 '18 at 10:12
  • Cool! You can find instructions for getting connected here: drupal.org/slack Once you're in, join the #commerce channel. There's always folks around. : ) – Ryan Szrama Jul 2 '18 at 14:27

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.