app/design/frontend/vagwan/moto/Magento_GroupedProduct/templates/product/view/type/grouped.phtml
How Can I display price sum of associated products in Grouped Product in product page view ? I ve tried this code but is not working.
<tr>
<?php
$all = $block->getAssociatedProducts($block->getProductPrice($_item));
if ($_associatedProducts) {
$priceForAll = 0;
foreach ($all as $product) {
$priceForAll += $product->getPrice();
}
}
?>
<?php echo $priceForAll ?>
</tr>