0

I have cshtml page for rendering products information.I have used micro data in the page .As I use angular variable to display the price, google structured data tool is throwing exception.

{{productData.retailPrice}} is not a valid price specification.

As I use angular variable to display the price, google structured data tool is throwing exception.

<span ng-cloak ng-if="productData.selectedItem.SingleUnitPrice > productData.customProductPrice.customPrice">                                                <span itemprop="priceCurrency" content="CAD">$</span><span itemprop="price" class="lineThruRegPrice">{{productData.selectedItem.SingleUnitPrice}}</span>

 <span itemprop="priceCurrency" content="CAD">$</span>
<span class="salePrice">{{productData.customProductPrice.customPrice}}</span>
 </span> <span ng-cloak ng if="productData.customProductPrice.customPrice==productData.selectedItem.RetailPrice">
<span itemprop="priceCurrency" content="CAD">$</span><span itemprop="price">{{productData.customProductPrice.customPrice}}</span>
                                            </span>

I expect the angular variable value to be read by google bot instead of the variable. Is the delay in evaluating the angular variable could cause this issue?

django
  • 190
  • 14

1 Answers1

0

The Structured Data Testing Tool has very limited ability to deal with JavaScript. I presume the true value is added by JavaScript and the tool does not see that.

You can now test Product markup on pages from within the Google Search Console. Do a URL Inspection on the page in question. It will show what Product markup Google sees.

You can then do Live tests to see how recent edits affect things.

This tool is based on Googlebot and renders pages in the same way.

Tony McCreath
  • 2,882
  • 1
  • 14
  • 21