商业用户登录
给店铺商品购买页面添加淘宝京东链接

效果如图:



电脑版商城内页:

打开 \t\1\Shop\Store\t001\MallView.aspx

找到<asp:Content ID="Content4" ContentPlaceHolderID="CPH_foot" runat="Server">,在此后面添加如下代码:

<script>$(".MallViewContents a[href*='buybtn=']").each(function(index){$(".MallView .con1 .son4 .sontd1").before('<td><a href="'+$(this).attr("href")+'" target="_blank" onmouseover="$h(this,0.8);" onmouseout="$h(this,1);" style="width:90px;height:38px;line-height:38px;text-decoration:none;display:block;text-align:center;font-size:14px;color:#fff;background:#46B5ED;-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;'+(index==0?"":"margin-left:10px;")+'">'+$(this).attr("href").substring($(this).attr("href").indexOf("buybtn=")+7)+"</a></td>");$(".MallView .con1 .son4 .sontd1").hide()});</script>


电脑版团购内页:

打开 \t\1\Shop\Store\t001\TuanView.aspx

找到<asp:Content ID="Content4" ContentPlaceHolderID="CPH_foot" runat="Server">,在此后面添加如下代码:

<script>var str151223="";$(".TuanViewContents a[href*='buybtn=']").each(function(index){str151223+='<a href="'+$(this).attr("href")+'" target="_blank" onmouseover="$h(this,0.8);" onmouseout="$h(this,1);" style="width:90px;height:38px;line-height:38px;text-decoration:none;display:block;text-align:center;font-size:14px;color:#fff;background:#c00;-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;float:left;'+(index==0?"":"margin-left:10px;")+'">'+$(this).attr("href").substring($(this).attr("href").indexOf("buybtn=")+7)+"</a>"});if(str151223!=""){$(".TuanView .con2 .son2 ").before('<table border="0" cellpadding="0" cellspacing="0" align="center" class="wto"> <tr> <td>'+str151223+'<div class="clear"></div></td> </tr> </table>');$(".TuanView .con2 .son2").hide();}</script>


机版商品内页及团购内页:

打开\t\1\Wap\ShopStore\MallView1.aspx和\t\1\Wap\ShopStore\TuanView1.aspx    

找到<asp:Content ID="Content4" ContentPlaceHolderID="CPH_sub_foot" runat="Server">,在此后面添加如下代码:

<script>$(".MallViewBox .con3 .son2 a[href*='buybtn=']").each(function(index){$("#BuyBtn").parent().parent().before('<td class="td5"><a href="'+$(this).attr("href")+'" target="_blank" onmouseover="$h(this,0.8);" onmouseout="$h(this,1);" style="width:90px;height:38px;line-height:38px;text-decoration:none;display:block;text-align:center;font-size:14px;color:#fff;background:#46B5ED;-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;'+(index==0?"":"margin-left:6px;")+'">'+$(this).attr("href").substring($(this).attr("href").indexOf("buybtn=")+7)+"</a></td>");$("#BuyBtn").parent().parent().hide()});</script>









假如您的淘宝商品的链接是 https://item.taobao.com/item.htm?spm=a217l.1100141.1998016669-3.9.fQANnP&id=44575817156

那么您在编辑器中添加链接时,在此链接后面加上&buybtn=去淘宝购买






草根网站梦想驱动者
进入知梦官方网站
演示:浏览页面体验功能
查看价格并购买知梦
联系官方客服:

Copyright  ©  知梦地方门户网站系统  All rights reserved

版权所有:湖北知科网络科技有限公司    公司电话:86-0711-3240005    值班电话:15871526095

公司地址:湖北省鄂州市鄂城区乡镇企业大厦404室    鄂ICP备10205759号