Get a calculated price from Product Variation I created a promotion with offer type - Fixed amount off each matching product and applies to - Specific product. In my custom block I get the product entity and try to get the calculated price via commerce_order.price_calculator service.

commercePriceCalc = \Drupal::service('commerce_order.price_calculator');
$context = new Context(\Drupal::entityTypeManager()-&gt;getStorage('user')-&gt;load(1), 
                     \Drupal::entityTypeManager()-&gt;getStorage('commerce_store')-&gt;load(1));
$prices = $commercePriceCalc-&gt;calculate($slide-&gt;field_product-&gt;entity, 1, $context);


So, calculate method returns me a PriceCalculatorResult object with 2 properties, calculatedPrice and basePrice but they are identical.

PriceCalculatorResult {#3311 ▼
  #calculatedPrice: Price {#3310 ▼
    #number: "1000.000000"
    #currencyCode: "UAH"
  }
  #basePrice: Price {#3310 ▼
    #number: "1000.000000"
    #currencyCode: "UAH"
  }
  #adjustments: []
}


As if the discount didn't apply.
Solved this problem, by passing the 4th argument $adjustment_types to the $commercePriceCalc-&gt;calculate method.

$adjustment_types = array("promotion" =&gt; "promotion");


So, the final version of the code

$commercePriceCalc = \Drupal::service('commerce_order.price_calculator');
$context = new Context(\Drupal::currentUser(), 
                     \Drupal::entityTypeManager()-&gt;getStorage('commerce_store')-&gt;load($store_id));
$prices = $commercePriceCalc-&gt;calculate($slide-&gt;field_product-&gt;entity, 1, $context, $adjustment_types);