Preconditions
Magento 2.1.2
Steps to reproduce
The rich snippets for magento 2 are giving a warning for the element price
https://search.google.com/structured-data/testing-tool#url=http%3A%2F%2Fmagento2demo.firebearstudio.com%2Fargus-all-weather-tank.html
The notation is now:
$22.00
The notation should be: (whithout the Currency)
22.00
Please, format this issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.
Please, also identify exact version of Magento you are running.
Better?
Same issue here v2.1.2
Can anyone provide a quick fix for this prior to the next release?
Same issue for me in 2.1.2. Can we get any news or diff in order to fix this issue ?
This works for me. Try updating <magento root>/vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml
From:
<?php echo $block->getSchema() ? ' itemprop="price"' : '' ?>>
To:
<?php echo $block->getSchema() ? ' itemprop="price" content="' . $block->getDisplayValue() . '"': '' ?>>
Before:
After:
Reference: http://schema.org/price
Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.
It looks like this was recently fixed by an accepted PR: https://github.com/magento/magento2/pull/8132, albeit in a slightly different way then what @Pakkapao was suggesting.
Can somebody confirm? @okorshenko @avoelkl?
Thanks for the heads up @hostep, this was indeed resolved with #8132.
Internal ticket created MAGETWO-70329
@Sergeacc: this was already fixed in https://github.com/magento/magento2/pull/8132, or is this new MAGETWO ticket for backporting the fix to 2.1? Or am I missing something here? :)
@hostep yes, this is new MAGETWO ticket for backporting the fix to 2.1
@JamboMedia, thank you for your report.
The fix for this issue is already available in the develop branch. See PR https://github.com/magento/magento2/pull/8132.
Most helpful comment
This works for me. Try updating
<magento root>/vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtmlFrom:
<?php echo $block->getSchema() ? ' itemprop="price"' : '' ?>>To:
<?php echo $block->getSchema() ? ' itemprop="price" content="' . $block->getDisplayValue() . '"': '' ?>>Before:

After:

Reference: http://schema.org/price