File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
app/code/Magento/Bundle/Model/Quote/Item Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Bundle \Model \Product \Price ;
11
11
use Magento \Bundle \Model \Product \Type ;
12
12
use Magento \Catalog \Model \Product ;
13
+ use Magento \Framework \Pricing \PriceCurrencyInterface ;
13
14
use Magento \Framework \Serialize \Serializer \Json ;
14
15
15
16
/**
@@ -22,13 +23,21 @@ class Option
22
23
*/
23
24
private $ serializer ;
24
25
26
+ /**
27
+ * @var PriceCurrencyInterface
28
+ */
29
+ protected $ priceCurrency ;
30
+
25
31
/**
26
32
* @param Json $serializer
33
+ * @param PriceCurrencyInterface $priceCurrency
27
34
*/
28
35
public function __construct (
29
- Json $ serializer
36
+ Json $ serializer ,
37
+ PriceCurrencyInterface $ priceCurrency ,
30
38
) {
31
39
$ this ->serializer = $ serializer ;
40
+ $ this ->priceCurrency = $ priceCurrency ;
32
41
}
33
42
34
43
/**
@@ -83,7 +92,7 @@ private function getBundleSelectionAttributes(Product $product, Product $selecti
83
92
'code ' => 'bundle_selection_attributes ' ,
84
93
'value ' => $ this ->serializer ->serialize (
85
94
[
86
- 'price ' => $ price ,
95
+ 'price ' => $ this -> priceCurrency -> convert ( $ price, $ product -> getStore ()) ,
87
96
'qty ' => $ qty ,
88
97
'option_label ' => $ bundleOption ->getTitle (),
89
98
'option_id ' => $ bundleOption ->getId (),
You can’t perform that action at this time.
0 commit comments