Jump to content

missing field 'price' in google search

Recommended Posts

I'm getting some errors in google search console.

Here is a code snippet from `product-list.tpl`:

{if (!$PS_CATALOG_MODE && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="content_price">
    {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
        <span itemprop="price" class="price product-price{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} product-price-new{/if}">
            {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
        <meta itemprop="priceCurrency" content="{$currency->iso_code}" />
        {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
            {hook h="displayProductPriceBlock" product=$product type="old_price"}
            <span class="old-price product-price">
                {displayWtPrice p=$product.price_without_reduction}
            {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
            {if $product.specific_prices.reduction_type == 'percentage'}
                <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
        {hook h="displayProductPriceBlock" product=$product type="price"}
        {hook h="displayProductPriceBlock" product=$product type="unit_price"}

How to fix this error?

Share this post

Link to post
Share on other sites

You should find something like

<span itemprop="price" content="{$product.price_amount}">{$product.price}</span>

in the catalog/_partials/product-prices.tpl file.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More