Reprint Please specify source: http://www.cnblogs.com/zhong-dev/p/4943065.html
Shop version Prestashop v1.6
Red Box Place, there will be two fields missing: Price and pricecurrency, this need to modify the template: Product-list.tpl Solution: Use the FTP tool, go to Themes, go to the current use of the theme, find PRODUCT-LIST.TPL file. Using editing tools such as sublime, search for the href= "http://schema.org/InStock" field, roughly as follows: Add the following code:
{if isset ($product. Show_price) && $product. Show_price &&!isset ($restricted _country_mode)} <span itemprop= "Price" > {if! $priceDisplay}{convertprice price= $product. Price}{else}{convertprice price=$ product.price_tax_exc}{/if} </span> <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} </span> {if $product. Specific_prices.reduction_type = = ' Percentage ' } <span class= "Price-percent-reduction" >-{$product. Specific_prices.reduction * 100}%</span> {/if} {/if} {Hook h= "Displayproductpriceblock" product= $product type= "Price"} {hook h= "Displayproductpriceblock" product= $product type= "Unit_price"}{/if}
The general effect is as follows:
The red box is the code that needs to be added, and then upload the modified TPL file to the server, and then check that there is no such problem.
PrestaShop fix Google structured Data testing Tool Error