Structured Data: Issues with Price and PriceCurrency

Highlighted
New Member
4 0 0

Hi,

I am having some issues with the Price and PriceCurrency (structred data) on my website. I tested the site on the testing tool and I am getting the isse below. Also, I am including the currency formatting and the code from the product.liquid section to see if anyone can help. 

------------------------------Issue ---------------------------------

Price: $ XXXX (The property $ XXXX  is not a valid price specification. Find out more about http://schema.org/price.)

Price currency: The priceCurrency field is recommended. Please provide a value if available.

----------------------- Currency formatting for Mexico ------

HTML with currency: $ {{amount}} MXN

HTML without currency: $ {{amount}} 

Email with currency: $ {{amount}} MXN

Email without currency: $ {{amount}} 

----------------------- Current Code on page.liquid  --------

  <p class="modal_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
          <meta itemprop="priceCurrency" content="{{ shop.currency }}" />
          <meta itemprop="seller" content="{{ shop.name | escape }}" />
          <meta itemprop="availability" content="{% if product.available %}in_stock{% else %}out_of_stock{% endif %}" />
          <meta itemprop="itemCondition" content="New" />

          <span class="sold_out">{% if variant.available == false %}{{ 'products.product.sold_out' | t }}{% endif %}</span>
          <span itemprop="price" content="{{ variant.price | money_without_currency }}" class="{% if variant.compare_at_price > variant.price %}sale{% endif %}">
            <span class="current_price">
              {% if variant.available %}
                {% if variant.price > 0 %} 
                  {{ variant.price | money }} 
                {% else %}
                  {{ settings.free_price_text }}
                {% endif %}
              {% endif %}
            </span>
          </span>
          <span class="was_price">
          {% if variant.price < variant.compare_at_price and variant.available %}
            {{ variant.compare_at_price | money }}
          {% endif %}
          </span>
        </p>

------------------------------------------------------------------------

Thank you for your help!

0 Likes
Highlighted
New Member
4 0 0

Does anyone know how to deal with this?

0 Likes
Highlighted
New Member
1 0 0

Ok, so I have the same problem. Here's the section of the HTML that's throwing up the error for one of my products in Google's structured data testing tool: -

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
      <p id="product-price">

       <span class="product-price" itemprop="price">£13.00</span>
          
      </p>  
      <meta itemprop="priceCurrency" content="GBP">
      <link itemprop="availability" href="http://schema.org/InStock">

AND here's the fix which I've just tested in Google's 'structured data testing tool': -


      <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
      <p id="product-price">
        <span class="product-price" itemprop="priceCurrency" content="GBP">£</span>
        <span itemprop="price" content="13.99">13.99</span>
        <link itemprop="availability" href="http://schema.org/InStock">
      </p>  

Obviously I'm coding for UK Pounds here, so you would just need to adjust your code to reflect your currency using the ISO 4217 codes.

I haven't done it yet, but I'm guessing I'll just need to edit around the java script code in my product.liquid template to reflect the structure of the fix. 

0 Likes