如何将自定义代码添加到prestashop [英] How to add custom code to prestashop
问题描述
我正在尝试将以下代码添加到我的prestashop网站中,以便能够显示我的Google受信任的网站徽章:
I am trying to add the following code to my prestashop site to be able to display my google trusted site badge:
<!-- 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 -->
我需要它在每个页面上都可见,无论我做什么,我都无法显示它.
i need it to be visible on every page and no matter what i do, i cant get it to display the badge.
推荐答案
您很可能需要安装一个模块来添加自定义html.
这是在底部/页脚区域添加的内容.
http://www.prestashop.com/forums/topic/165066-free-prestashop-module-easy-footer/
您可以在页脚区域添加自定义html内容,这对整个网站都是可见的.
most likely you need installing a module to add custom html.
here is one to add on the bottom/footer area.
http://www.prestashop.com/forums/topic/165066-free-prestashop-module-easy-footer/
you can add custom html content on footer area and it will be visible to whole website.
这篇关于如何将自定义代码添加到prestashop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!