getTypeId() !== Configurable::TYPE_CODE) { return 0; } /** @var Configurable $configurableProduct */ $configurableProduct = $product->getTypeInstance(); $msrp = 0; $prices = []; foreach ($configurableProduct->getUsedProducts($product) as $item) { if ($item->getMsrp() !== null) { $prices[] = $item->getMsrp(); } } if ($prices) { $msrp = (float)max($prices); } return $msrp; } }