File tree Expand file tree Collapse file tree 5 files changed +14
-2
lines changed Expand file tree Collapse file tree 5 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ interface MsrpPriceCalculatorInterface
20
20
* @return float
21
21
*/
22
22
public function getMsrpPriceValue (ProductInterface $ product ): float ;
23
- }
23
+ }
Original file line number Diff line number Diff line change @@ -30,13 +30,17 @@ public function getMsrpPriceValue(ProductInterface $product): float
30
30
31
31
/** @var Configurable $configurableProduct */
32
32
$ configurableProduct = $ product ->getTypeInstance ();
33
+ $ msrp = 0 ;
33
34
$ prices = [];
34
35
foreach ($ configurableProduct ->getUsedProducts ($ product ) as $ item ) {
35
36
if ($ item ->getMsrp () !== null ) {
36
37
$ prices [] = $ item ->getMsrp ();
37
38
}
38
39
}
40
+ if ($ prices ) {
41
+ $ msrp = (float )max ($ prices );
42
+ }
39
43
40
- return $ prices ? max ( $ prices ) : 0 ;
44
+ return $ msrp ;
41
45
}
42
46
}
Original file line number Diff line number Diff line change
1
+ # MsrpConfigurableProduct
2
+
3
+ ** MsrpConfigurableProduct** provides type and resolver information for the Msrp module from the ConfigurableProduct module.
Original file line number Diff line number Diff line change
1
+ # MsrpGroupedProduct
2
+
3
+ ** MsrpGroupedProduct** provides type and resolver information for the Msrp module from the GroupedProduct module.
Original file line number Diff line number Diff line change 181
181
"magento/module-media-storage" : " *" ,
182
182
"magento/module-message-queue" : " *" ,
183
183
"magento/module-msrp" : " *" ,
184
+ "magento/module-msrp-configurable-product" : " *" ,
185
+ "magento/module-msrp-grouped-product" : " *" ,
184
186
"magento/module-multishipping" : " *" ,
185
187
"magento/module-mysql-mq" : " *" ,
186
188
"magento/module-new-relic-reporting" : " *" ,
You can’t perform that action at this time.
0 commit comments