我正试图将以下代码添加到我的预商店网站中,以便能够显示我的google受信任站点徽章:
<!-- BEGIN: Google Trusted Stores -->
<script type="text/javascript">
var gts = gts || [];
gts.push(["id", "STORE_ID"]);
gts.push(["badge_position", "BOTTOM_RIGHT"]);
gts.push(["locale", "english_australia"]);
gts.push(["google_base_offer_id", "ITEM_GOOGLE_SHOPPING_ID"]);
gts.push(["google_base_subaccount_id", "ITEM_GOOGLE_SHOPPING_ACCOUNT_ID"]);
gts.push(["google_base_country", "ITEM_GOOGLE_SHOPPING_COUNTRY"]);
gts.push(["google_base_language", "ITEM_GOOGLE_SHOPPING_LANGUAGE"]);
(function() {
var gts = document.createElement("script");
gts.type = "text/javascript";
gts.async = true;
gts.src = "https://www.googlecommerce.com/trustedstores/api/js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(gts, s);
})();
</script>
<!-- END: Google Trusted Stores -->我需要它在每一页可见,无论我做什么,我不能让它显示徽章。
发布于 2014-12-16 06:52:04
很可能您需要安装一个模块来添加自定义html。
下面是要添加到底部/页脚区域的一个。
http://www.prestashop.com/forums/topic/165066-free-prestashop-module-easy-footer/
您可以在页脚区域添加自定义html内容,它将对整个网站可见。
发布于 2016-08-09 08:57:41
现在有点晚了,但最简单的方法是创建一个js文件,并将其放在主题脚本文件夹中: /themes/yourtheme/js/autoload,这样就可以将它加载到每个页面上。
发布于 2014-12-16 07:29:53
最简单的方法是在header.tpl中插入代码。
https://stackoverflow.com/questions/27498995
复制相似问题