广州传奇网络

地址:广州市天河区东圃大马路富华楼C座

电话:13808825895

邮箱:gz020wbs@163.com

QQ:1564443073

网址:http://www.020wbs.com/

首页 > 二次开发Ecshop二次开发 > 实现ecshop首页增加楼层直达效果分析

二次开发Ecshop二次开发

二次开发Ecshop二次开发

实现ecshop首页增加楼层直达效果分析

 <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>

在body标签的下方 增加 下列代码:

 

 

PHP

<ul> <!-- {if $category_goods} --> <!--{foreach from=$category_goods item=ginfo name=gcur}--> <li data-slide="{$ginfo.sort_order}"><a href="javascript:void(0);">{$ginfo.keywords}</a></li> <!-- {/foreach} --> <!-- {/if} --> </ul>

以上代码不可以直接使用,需要按自己的模板处理。

楼层代码如下:

 

 

PHP

<div data-slide="{$ginfo.sort_order}"> <div> <div> <div><!--fp-floor-nvz 某个楼层的楼层色块图--> <div> <div> <ul> <li> <a href="{$ginfo.url}"> <span> {$ginfo.floor_style} </span> <span>{$ginfo.cat_name}</span> </a> </li> <li> <!--More--> <!-- <b></b> </li> <li> <a href=""> <span></span> <span>名称</span> </a> </li> --> <!--More--> </ul> <div> <div> <div> <a title="{$ginfo.cat_name}" href="javascript:void(0);"><img src="{$ginfo.cat_pic}" title="{$ginfo.cat_name}" alt="{$ginfo.cat_name}"></a> </div> </div> </div> <div> <ul> <li> <!--{foreach from=$ginfo.catgoods item=gc name=gcr}--> <!--{if $smarty.foreach.gcr.iteration < 3}--> <a href="{$gc.url}">{$gc.name}</a> <!--{/if}--> <!--{/foreach}--> </li> <li> <!--{foreach from=$ginfo.catgoods item=gc name=gcrn}--> <!--{if $smarty.foreach.gcrn.iteration > 2 && $smarty.foreach.gcrn.iteration < 5}--> <a href="{$gc.url}">{$gc.name}</a> <!--{/if}--> <!--{/foreach}--> </li> <li> <!--{foreach from=$ginfo.catgoods item=gc name=gcrnn}--> <!--{if $smarty.foreach.gcrnn.iteration > 4 && $smarty.foreach.gcrnn.iteration < 7}--> <a href="{$gc.url}">{$gc.name}</a> <!--{/if}--> <!--{/foreach}--> </li> <li> <!--{foreach from=$ginfo.catgoods item=gc name=gcrnnn}--> <!--{if $smarty.foreach.gcrnnn.iteration > 6 && $smarty.foreach.gcrnnn.iteration < 9}--> <a href="{$gc.url}">{$gc.name}</a> <!--{/if}--> <!--{/foreach}--> </li> </ul> </div> </div> <div> <div> <?php $GLOBALS['smarty']->assign('floor_bigimg',get_adv('首页-楼层ID'.$GLOBALS['smarty']->_var['ginfo']['id'].'-方大图',1)); ?> {if $floor_bigimg} {$floor_bigimg} {else} 请在供货商后台增加广告位:首页-楼层ID<?php echo $GLOBALS['smarty']->_var['ginfo']['id']; ?>-方大图 大小为400*422 {/if} </div> <div> <!--{foreach from=$ginfo.goods item=bestgoods name=goodscur}--> <!--{if $smarty.foreach.goodscur.iteration > 0 && $smarty.foreach.goodscur.iteration <3}--> <div href="{$bestgoods.url}"> <!--{if $bestgoods.ye eq 0}--> <div> <a title="{$bestgoods.name}" href="{$bestgoods.url}" target="_blank"><img src="{$bestgoods.thumb}" alt="{$bestgoods.name}" height=146"></a> </div> <div> <div> <a title="{$bestgoods.name}" href="{$bestgoods.url}" target="_blank">{$bestgoods.name}</a> </div> <div> <div> <!-- {if $bestgoods.promote_price neq ""} --> {$bestgoods.promote_price} <!-- {else}--> {$bestgoods.shop_price} <!--{/if}--> </div> <div> 立即购商品 </div> </div> </div> <!--{else}--> <img src="no_goods.jpg" alt="未传商品"/> <!--{/if}--> </div> <!--{/if}--> <!--{/foreach}--> </div> <div> <!--{foreach from=$ginfo.goods item=bestgoods name=goodscur}--> <!--{if $smarty.foreach.goodscur.iteration > 2 && $smarty.foreach.goodscur.iteration <5}--> <div href="{$bestgoods.url}"> <!--{if $bestgoods.ye eq 0}--> <div> <a title="{$bestgoods.name}" href="{$bestgoods.url}" target="_blank"><img src="{$bestgoods.thumb}" alt="{$bestgoods.name}" height=146"></a> </div> <div> <div> <a title="{$bestgoods.name}" href="{$bestgoods.url}" target="_blank">{$bestgoods.name}</a> </div> <div> <div> <!-- {if $bestgoods.promote_price neq ""} --> {$bestgoods.promote_price} <!-- {else}--> {$bestgoods.shop_price} <!--{/if}--> </div> <div> 立即购商品 </div> </div> </div> <!--{else}--> <img src="no_goods.jpg" alt="未传商品"/> <!--{/if}--> </div> <!--{/if}--> <!--{/foreach}--> </div> <div> <!--{foreach from=$ginfo.yuegou_goods item=bestgoods name=goodscur}--> <div href="{$bestgoods.url}"> <!--{if $bestgoods.ye eq 0}--> <div> <a title="{$bestgoods.name}" href="{$bestgoods.url}" target="_blank"><img src="{$bestgoods.thumb}" alt="{$bestgoods.name}" height=146"></a> </div> <div> <div> <a title="{$bestgoods.name}" href="{$bestgoods.url}" target="_blank">{$bestgoods.name}</a> </div> <div> <div> <!-- {if $bestgoods.promote_price neq ""} --> {$bestgoods.promote_price} <!-- {else}--> {$bestgoods.shop_price} <!--{/if}--> </div> <div> 约购商品 </div> </div> </div> <!--{else}--> <img src="no_goods.jpg" alt="未传商品"/> <!--{/if}--> </div> <!--{/foreach}--> </div> </div> </div> </div> </div> </div> {if $ginfo.is_longads eq 1} <!--广告条--> <div><div> <ins><div> <?php $GLOBALS['smarty']->assign('floor_img',get_adv('首页-楼层F'.$GLOBALS['smarty']->_var['ginfo']['sort_order'].'-长图',1)); ?> {if $floor_img} {$floor_img} {else} 请在供货商后台增加广告位:首页-楼层F<?php echo $GLOBALS['smarty']->_var['ginfo']['sort_order']; ?>-长图 大小为1190*90 {/if} </div></div> </div> <!--广告条--> {/if} </div>
以上代码不可以直接使用,需要按自己的模板处理