在商品列表页面当中的“收藏”、“购买”、“比较”功能都无法实现,只要将该段源代码加入page_header.lbi当中就行了。
{insert_scripts files='transport.js,common.js,utils.js'} <script language="javascript"> function remove(id, url) { if (document.getCookie("compareItems") != null) { var obj = document.getCookie("compareItems").parseJSON(); delete obj[id]; var date = new Date(); date.setTime(date.getTime() + 99999999); document.setCookie("compareItems", obj.toJSONString()); } } var compare_no_goods = "{$lang.compare_no_goods}"; var btn_buy = "{$lang.btn_buy}"; var is_cancel = "{$lang.is_cancel}"; var select_spe = "{$lang.select_spe}"; <script type="text/javascript"> var process_request = "{$lang.process_request}"; </script>
转载于:https://blog.51cto.com/hdjdcyl/1147803