File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
Catalog/view/base/templates/product/price/amount
GroupedProduct/view/base/templates/product/price
design/frontend/Magento/luma/Magento_Catalog/web/css/source Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 2222 class="price-wrapper <?php /* @escapeNotVerified */ echo $ block ->getPriceWrapperCss (); ?> ">
2323 <?php /* @noEscape */ echo $ block ->formatCurrency ($ block ->getDisplayValue (), (bool )$ block ->getIncludeContainer ()) ?>
2424 </span>
25- <?php if ($ block ->getSchema ()): ?>
26- <span class="_hidden" itemprop="price">
27- <?php /* @noEscape */ echo $ block ->getDisplayValue () ?>
28- </span>
29- <?php endif ; ?>
3025 <?php if ($ block ->hasAdjustmentsHtml ()): ?>
3126 <?php echo $ block ->getAdjustmentsHtml () ?>
3227 <?php endif ; ?>
3328 <?php if ($ block ->getSchema ()): ?>
29+ <meta itemprop="price" content="<?php /* @noEscape */ echo $ block ->getDisplayValue (); ?> " />
3430 <meta itemprop="priceCurrency" content="<?php /* @escapeNotVerified */ echo $ block ->getDisplayCurrencyCode ()?> " />
3531 <?php endif ; ?>
3632</span>
Original file line number Diff line number Diff line change @@ -17,13 +17,19 @@ $minProduct = $block->getSaleableItem()
1717 ->getMinProduct ();
1818
1919if ($ minProduct ) {
20+ $ finalPrice = $ minProduct ->getPriceInfo ()->getPrice ('final_price ' );
21+ $ finalPriceValue = $ finalPrice ->getAmount ();
2022 $ amountRender = $ block ->getRendererPool ()
2123 ->createAmountRender (
22- $ minProduct -> getPriceInfo ()-> getPrice ( ' final_price ' )-> getAmount () ,
24+ $ finalPriceValue ,
2325 $ minProduct ,
24- $ minProduct -> getPriceInfo ()-> getPrice ( ' final_price ' ) ,
26+ $ finalPrice ,
2527 ['include_container ' => true ]
2628 );
29+ $ currencyCode = $ amountRender ->getDisplayCurrencyCode ();
30+ } else {
31+ $ finalPriceValue = 0 ;
32+ $ currencyCode = '' ;
2733}
2834?>
2935<div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
@@ -32,4 +38,6 @@ if ($minProduct) {
3238 <span class="price-label"><?php /* @escapeNotVerified */ echo __ ('Starting at ' )?> </span><?php echo $ amountRender ->toHtml ();?>
3339 </p>
3440 <?php endif ?>
41+ <meta itemprop="price" content="<?php /* @noEscape */ echo $ finalPriceValue ; ?> " />
42+ <meta itemprop="priceCurrency" content="<?php /* @noEscape */ echo $ currencyCode ; ?> " />
3543</div>
Original file line number Diff line number Diff line change 189189 & :last-child {
190190 margin-bottom : 0 ;
191191 }
192-
193- & ._hidden {
194- display : none ;
195- }
196192 }
197193 }
198194 }
You can’t perform that action at this time.
0 commit comments