Craig Day Posted March 8, 2023 Share Posted March 8, 2023 After submitting the sitemaps to Google Search Console I get a number of errors regarding Product Snippets. - Either "offers", "review", or "aggregateRating" should be specified - 286 items. - Missing field "priceValidUntil" (in "offers"), Example page that it highlights as invalid: https://www.cashmerestore.co.uk/en/goatskin-cushions-pillows/151-light-grey-goatskin-cushion-45-x-45.html Site: www.cashmerestore.co.uk Prestashop Version: 1.7.8.7. PHP Version: 7.3.29 2 questions - What's causing it and how do I fix it? Link to comment Share on other sites More sharing options...
Craig Day Posted March 30, 2023 Author Share Posted March 30, 2023 What I ended up doing (in case anyone has the same problem) is as follows: In Themes/<theme_name>/Templates/Catalog/_Partials/Minitures/product.tpl Block - product_price_and_shipping add " itemprop="offers" itemscope itemtype="https://schema.org/Offer" > <link itemprop="availability" href="https://schema.org/InStock"/> <meta itemprop="priceCurrency" content="{$currency.iso_code|escape:'html':'UTF-8'}"> " to the end of the div tag so it reads as follows: {block name='product_price_and_shipping'} {if $product.show_price} <div class="product-price-and-shipping" itemprop="offers" itemscope itemtype="https://schema.org/Offer" > <link itemprop="availability" href="https://schema.org/InStock"/> <meta itemprop="priceCurrency" content="{$currency.iso_code|escape:'html':'UTF-8'}"> {hook h='displayProductPriceBlock' product=$product type="before_price"} <span itemprop="price" class="price">{$product.price|escape:'html':'UTF-8'}</span> {if $product.has_discount} {hook h='displayProductPriceBlock' product=$product type="old_price"} <span class="regular-price">{$product.regular_price|escape:'html':'UTF-8'}</span> {*if $product.discount_type === 'percentage'} <span class="discount-percentage">{$product.discount_percentage|escape:'html':'UTF-8'}</span> {/if*} {/if} {hook h='displayProductPriceBlock' product=$product type='unit_price'} {hook h='displayProductPriceBlock' product=$product type='weight'} </div> {/if} {/block} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now