关于在ECSHOP商品页增加“分享到开心网、人人网”的功能

2016-09-11 20:39 来源:www.chinab4c.com 作者:ecshop专家

来源:
 

 

(注:以下修改是在ECSHOP官方默认模板基础上进行的), 打开 模板文件 /themes/default/goods.dwt 文件,

找到 !-- {if $affiliate.on} -- a href=user.php?act=affiliategoodsid={$goods.goods_id}im

效果图如下

 

 

 先下载本文底部附件内的图片素材,上传至模板images目录下。

 


(注:以下修改是在ECSHOP官方默认模板基础上进行的),
打开 模板文件 /themes/default/goods.dwt 文件,

找到
<!-- {if $affiliate.on} -->
      <a href="user.php?act=affiliate&goodsid={$goods.goods_id}"><img src='images/bnt_recommend.gif'></a>
      <!-- {/if} -->
      </li>


在它下面增加以下代码即可
 
      <li>
      分享到:
      <a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('http://www.kaixin001.com/~repaste/repaste.php?&amp;rurl='+escape(d.location.href)+'&amp;rtitle='+escape(d.title)+'&amp;rcontent='+escape(d.title),'kaixin'));kaixin.focus();"><img src="images/ico_kaixin.gif" alt="转贴到开心网" border="0" height="16" width="16"></a> 
      <a href="javascript:void((function(s,d,e){if(/renren\\.com/.test(d.location))return;var f='http://share.renren.com/share/buttonshare?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));" title="分享到人人"><img  src="images/ico_renren.gif" title="分享到人人"/></a> 
      <a href="javascript:window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','width=450,height=400');void(0)"><img src='images/ico_sina.gif' alt='分享到新浪微博' border='0'></a>
      <a href="javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','');void(0)"><img src="images/ico_qqshuqian.gif" alt="QQ书签" border="0" ></a> 
      <a href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0" ><IMG alt=添加到百度搜藏 src="images/ico_baidu.gif"  border=0></a> 
<a href="javascript:void(window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href)));" title="分享到QQ空间"><img src="images/ico_qq.gif" alt="" /></a> 
      <a href="#" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=780,height=550,left=80,top=80,status=yes,resizable=yes');"><img src="images/ico_yahoo.gif" alt="雅虎收藏" border="0" height="16" width="16"></a>
      </li>