PrestaShop fix Google structured Data testing Tool Error

Source: Internet
Author: User
Tags prestashop

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}"/&gt    ; {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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.