google microdata price should not include currency symbol ($,€, £)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi-

I discovered a small issue with how the product offer/price microdata is generated.
When you run Googles structured data testing tool, it shows a warning on the price and indicates that we should not be including the currency indicator (dollar, pounds or euros symbols, etc..)
Since we supply the PriceCurrency value in the microdata, they already know which symbol is appropriate. They just want the numeric value. http://schema.org/price

From the /Views/Product/_ProductPrice.cshtml:

            @*render price*@
            <span @if (String.IsNullOrWhiteSpace(Model.PriceWithDiscount)) { <text> itemprop="price" class="price-value-@(Model.ProductId)" </text>  }>
                @if (dynamicPriceUpdateSupported && !Model.HidePrices && String.IsNullOrWhiteSpace(Model.PriceWithDiscount))
                {
                    @Html.Raw(Regex.Replace(Model.Price, dynamicPricePattern, dynamicPriceReplacement))
                }
                else
                {
                    @Html.Raw(Model.Price)
                }
            </span>
        </div>


How can this be changed to at least supply a hidden span with the price, but without the currency symbol?
6 years ago
Hi Steve,

Could you please share a screenshot with warning? It works fine for our demo site (no warnings)
6 years ago


Maybe the problem has already been fixed?? This site is still just running 3.40. We are upgraded now to 3.90 on our development site and will upgrade to 4.0 before we go LIVE with it in December.

Okay...I just compared code in 3.90 and see how you guys changed it.
I will just copy in the changes to my 3.40 for now.

Nevermind....sorry.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.