Skip to content

Commit 8f1f09f

Browse files
committed
ACP2E-2950: [Cloud] Bundle Product wrong pricing in order confirmation
1 parent 488c103 commit 8f1f09f

File tree

1 file changed

+11
-2
lines changed
  • app/code/Magento/Bundle/Model/Quote/Item

1 file changed

+11
-2
lines changed

app/code/Magento/Bundle/Model/Quote/Item/Option.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Bundle\Model\Product\Price;
1111
use Magento\Bundle\Model\Product\Type;
1212
use Magento\Catalog\Model\Product;
13+
use Magento\Framework\Pricing\PriceCurrencyInterface;
1314
use Magento\Framework\Serialize\Serializer\Json;
1415

1516
/**
@@ -22,13 +23,21 @@ class Option
2223
*/
2324
private $serializer;
2425

26+
/**
27+
* @var PriceCurrencyInterface
28+
*/
29+
protected $priceCurrency;
30+
2531
/**
2632
* @param Json $serializer
33+
* @param PriceCurrencyInterface $priceCurrency
2734
*/
2835
public function __construct(
29-
Json $serializer
36+
Json $serializer,
37+
PriceCurrencyInterface $priceCurrency,
3038
) {
3139
$this->serializer = $serializer;
40+
$this->priceCurrency = $priceCurrency;
3241
}
3342

3443
/**
@@ -83,7 +92,7 @@ private function getBundleSelectionAttributes(Product $product, Product $selecti
8392
'code' => 'bundle_selection_attributes',
8493
'value'=> $this->serializer->serialize(
8594
[
86-
'price' => $price,
95+
'price' => $this->priceCurrency->convert($price, $product->getStore()),
8796
'qty' => $qty,
8897
'option_label' => $bundleOption->getTitle(),
8998
'option_id' => $bundleOption->getId(),

0 commit comments

Comments
 (0)