Skip to content

Commit fc17da8

Browse files
OlgaVasyltsundhorytskyi
authored andcommitted
MAGETWO-70329: [GITHUB] The rich snippets are giving a warning for the element price #7173
1 parent 4a04354 commit fc17da8

File tree

2 files changed

+2
-10
lines changed
  • app
    • code/Magento/Catalog/view/base/templates/product/price/amount
    • design/frontend/Magento/luma/Magento_Catalog/web/css/source

2 files changed

+2
-10
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@
2020
data-price-amount="<?php /* @escapeNotVerified */ echo $block->getDisplayValue(); ?>"
2121
data-price-type="<?php /* @escapeNotVerified */ echo $block->getPriceType(); ?>"
2222
class="price-wrapper <?php /* @escapeNotVerified */ echo $block->getPriceWrapperCss(); ?>">
23-
<?php /* @noEscape */ echo $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
23+
<?php /* @escapeNotVerified */ 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 /* @escapeNotVerified */ echo $block->getDisplayValue(); ?>" />
3430
<meta itemprop="priceCurrency" content="<?php /* @escapeNotVerified */ echo $block->getDisplayCurrencyCode()?>" />
3531
<?php endif; ?>
3632
</span>

app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,6 @@
189189
&:last-child {
190190
margin-bottom: 0;
191191
}
192-
193-
&._hidden {
194-
display: none;
195-
}
196192
}
197193
}
198194
}

0 commit comments

Comments
 (0)