博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PrestaShop 修复Google Structured Data Testing Tool 报错
阅读量:7190 次
发布时间:2019-06-29

本文共 1160 字,大约阅读时间需要 3 分钟。

转载请注明出处: 

网店版本 

上图红框的地方,会缺少两个字段:price 和 priceCurrency,这个就需要修改模板了:product-list.tpl
 
解决方案:
使用 ftp 工具,进入到 Themes,进入目前使用的主题,找到 product-list.tpl 文件。使用 sublime 等编辑工具,搜索 href="http://schema.org/InStock" 字段,大致如下:
添加的代码如下:
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}        {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}        
{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"} {displayWtPrice p=$product.price_without_reduction} {if $product.specific_prices.reduction_type == 'percentage'} -{$product.specific_prices.reduction * 100}% {/if} {/if} {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="unit_price"}{/if}

大致效果如下:

红框部分就是需要添加的代码,再把修改好的tpl文件传到服务器,再检测一下就没有这些问题了

  

转载于:https://www.cnblogs.com/zhong-dev/p/4943065.html

你可能感兴趣的文章
A Simple OpenGL Shader Example
查看>>
资料整理面试
查看>>
理解JavaScript中的事件处理
查看>>
lock: mutex/spinlock/shared lock
查看>>
基于JAVA的身份证实名认证接口调用代码实例
查看>>
Shell命令-文件压缩解压缩之tar、unzip
查看>>
挺有意思的一段VBS代码,让系统阅读/朗读指定文本
查看>>
mysql体系结构
查看>>
CSS实现图片半透明代码
查看>>
hdu 4135 Co-prime (素数打表+容斥原理)
查看>>
manacher算法求最长回文子串
查看>>
(转)IDataGridViewEditingControl 接口 作用
查看>>
ie兼容性问题的一些总结,待添加。后续有图
查看>>
获取客户端IP
查看>>
【论文阅读】StainGAN: Stain Style Transfer for Digital Histological Images
查看>>
细节性的错误
查看>>
c++中string的用法
查看>>
oracle中if/else功能的实现的3种写法
查看>>
获取当前控制器
查看>>
装机快捷键
查看>>