Skip to content

Commit 3dff31f

Browse files
committed
MAGETWO-70329: [GITHUB] The rich snippets are giving a warning for the element price #7173
1 parent f1f9dc8 commit 3dff31f

File tree

1 file changed

+5
-3
lines changed
  • app/code/Magento/Catalog/view/base/templates/product/price/amount

1 file changed

+5
-3
lines changed

app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
class="price-wrapper <?php /* @escapeNotVerified */ echo $block->getPriceWrapperCss(); ?>">
2323
<?php /* @noEscape */ echo $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
2424
</span>
25-
<span class="_hidden"<?php echo $block->getSchema() ? ' itemprop="price"' : '' ?>>
26-
<?php /* @noEscape */ echo $block->getDisplayValue() ?>
27-
</span>
25+
<?php if ($block->getSchema()): ?>
26+
<span class="_hidden" itemprop="price">
27+
<?php /* @noEscape */ echo $block->getDisplayValue() ?>
28+
</span>
29+
<?php endif; ?>
2830
<?php if ($block->hasAdjustmentsHtml()): ?>
2931
<?php echo $block->getAdjustmentsHtml() ?>
3032
<?php endif; ?>

0 commit comments

Comments
 (0)