Skip to content

Commit db2e9f0

Browse files
committed
MC-15085: Cannot install Magento without ConfigurableProduct module
1 parent c3effa5 commit db2e9f0

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

app/code/Magento/Msrp/Pricing/MsrpPriceCalculatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ interface MsrpPriceCalculatorInterface
2020
* @return float
2121
*/
2222
public function getMsrpPriceValue(ProductInterface $product): float;
23-
}
23+
}

app/code/Magento/MsrpConfigurableProduct/Pricing/MsrpPriceCalculator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ public function getMsrpPriceValue(ProductInterface $product): float
3030

3131
/** @var Configurable $configurableProduct */
3232
$configurableProduct = $product->getTypeInstance();
33+
$msrp = 0;
3334
$prices = [];
3435
foreach ($configurableProduct->getUsedProducts($product) as $item) {
3536
if ($item->getMsrp() !== null) {
3637
$prices[] = $item->getMsrp();
3738
}
3839
}
40+
if ($prices) {
41+
$msrp = (float)max($prices);
42+
}
3943

40-
return $prices ? max($prices) : 0;
44+
return $msrp;
4145
}
4246
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# MsrpConfigurableProduct
2+
3+
**MsrpConfigurableProduct** provides type and resolver information for the Msrp module from the ConfigurableProduct module.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# MsrpGroupedProduct
2+
3+
**MsrpGroupedProduct** provides type and resolver information for the Msrp module from the GroupedProduct module.

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@
181181
"magento/module-media-storage": "*",
182182
"magento/module-message-queue": "*",
183183
"magento/module-msrp": "*",
184+
"magento/module-msrp-configurable-product": "*",
185+
"magento/module-msrp-grouped-product": "*",
184186
"magento/module-multishipping": "*",
185187
"magento/module-mysql-mq": "*",
186188
"magento/module-new-relic-reporting": "*",

0 commit comments

Comments
 (0)