iwebshop 模板手册

1.面包屑

<div class="position"><span>您当前的位置:</span><a href="{url:}">首页</a>{foreach:items=$breadGuide} » <a href="{url:/site/pro_list/cat/$item[id]}">{$item[‘name‘]}</a>{/foreach} » {$name}</div>

2.商品编号:

{echo:$goods_no?$goods_no:$id}

3.品牌

{if:isset($brand)}品牌:{$brand}{/if}

4.抢购

<!--抢购-->
            {if:$promo == ‘time‘}
                {if:isset($promotion)}
                <!--抢购正常-->
                <li class="current">
                    <span class="bold red2">抢购价:</span><b class="price red2"><span class="f30">¥</span>{$promotion[‘award_value‘]}</b>
                    {query:name=promotion fields=award_value,end_time,user_group where=type eq 1 and `condition` eq $id and NOW() between start_time and end_time}
                    {set:$free_time = ITime::getDiffSec($item[‘end_time‘]);}
                    <span class="time" id="promotiona">还剩 <i class="bold red2" id=‘cd_hour_promotiona‘>{echo:floor($free_time/3600);}</i>小时<i class="bold red2" id=‘cd_minute_promotiona‘>{echo:floor(($free_time%3600)/60);}</i>分<i class="bold red2" id=‘cd_second_promotiona‘>{echo:$free_time%60;}</i>秒结束</span>
                    {/query}
                </li>
                <li>
                    销售价:<span class="price light_gray"><s class="f30">¥<label id="data_sellPrice">{$sell_price}</label></s></span>
                    立省:¥{echo:abs($sell_price-$promotion[‘award_value‘])}
                </li>
                {else:}
                <!--抢购过期-->
                <li><span class="f30"><img src="{skin:images/front/grab_expir.png}" style="float:right;" name="timeover" /></span></li>
                <li>销售价:<b class="price red2"><span class="f30">{if:$minSellPrice != $maxSellPrice}¥{$minSellPrice} - ¥{$maxSellPrice}{else:}¥{$sell_price}{/if}</span></b></li>
                {/if}
            {/if}
View Code

5.团购

<!--团购-->
            {if:$promo == ‘groupon‘}
                {if:isset($regiment)}
                <!--团购正常-->
                <li class="current">
                    <span class="bold red2">团购价:</span><b class="price red2"><span class="f30">¥</span>{$regiment[‘regiment_price‘]}</b>
                    {query:name=regiment fields=id as rid,regiment_price,end_time,start_time where= goods_id eq $id and  NOW() between start_time and end_time}
                    {set:$free_time = ITime::getDiffSec($item[‘end_time‘]);}
                    <span class="time" id="promotionb">还剩 <i class="bold red2" id=‘cd_hour_promotionb‘>{echo:floor($free_time/3600);}</i>小时<i class="bold red2" id=‘cd_minute_promotionb‘>{echo:floor(($free_time%3600)/60);}</i>分<i class="bold red2" id=‘cd_second_promotionb‘>{echo:$free_time%60;}</i>秒结束</span>
                    {query:name=regiment_user_relation fields=count(*) as totalNum where=regiment_id eq $item[rid] item = $value}
                    <span class="bold red2">已参加团购{$value[‘totalNum‘]}人</span>
                    {/query}
                    {/query}
                </li>
                <li>
                    销售价:<span class="price light_gray"><s class="f30">¥<label id="data_sellPrice">{$sell_price}</label></s></span>
                    立省:¥{echo:abs($sell_price-$regiment[‘regiment_price‘])}
                </li>
                {else:}
                <!--团购过期-->
                <li><span class="f30"><img src="{skin:images/front/group_expir.png}" style="float:right;" name="timeover" /></span></li>
                <li>销售价:<b class="price red2"><span class="f30">{if:$minSellPrice != $maxSellPrice}¥{$minSellPrice} - ¥{$maxSellPrice}{else:}¥{$sell_price}{/if}</span></b></li>
                {/if}
            {/if}
View Code

6.普通正常

<!--普通正常-->
            {if:$promo == ‘‘}
            <!--商品价格-->
            <li id=‘priceLi‘></li>
            {/if}

            <li>
                市场价:<s id="data_marketPrice">{if:$minMarketPrice != $maxMarketPrice}¥{$minMarketPrice} - ¥{$maxMarketPrice}{else:}¥{$market_price}{/if}</s>
            </li>

            <li>
                库存:现货<span>(<label id="data_storeNums">{$store_nums}</label>)</span>
                <a class="favorite" onclick="favorite_add(this);" href="javascript:void(0)">收藏此商品</a>
            </li>

            <li>顾客评分:<span class="grade"><i style="width:{echo:Common::gradeWidth($grade,$comments)}px;"></i></span>(已有{$comments}人评价)</li>

            {if:$point > 0}
            <li>送积分:单件送{$point}分</li>
            {/if}
View Code

7.所在区域

<li class="relative" style="z-index:2"><a class="sel_area blue" href="javascript:;">所在地区</a><span id="deliveInfo"></span>
                <div class="area_box" style="display:none;">
                    <ul>
                        <li><a data-code="1" href="#J_PostageTableCont"><strong>全部</strong></a></li>
                        {query:name=areas where=parent_id eq 0}
                        <li><a href="javascript:delivery(‘{$item[‘area_id‘]}‘,‘{$item[‘area_name‘]}‘)">{$item[‘area_name‘]}</a></li>
                        {/query}
                    </ul>
                </div>
            </li>
View Code

8.商家信息

<!--商家信息 开始-->
            {if:isset($seller)}
            <li>商家:<a class="orange" href="{url:/site/home/id/$seller_id}">{$seller[‘true_name‘]}</a></li>
            <li>联系电话:{$seller[‘phone‘]}</li>
            <li>所在地:{echo:join(‘ ‘,area::name($seller[‘province‘],$seller[‘city‘],$seller[‘area‘]))}</li>
            <li>立即咨询:{set:Sonline::qqShow($seller[‘server_num‘])}</li>
            {/if}
            <!--商家信息 结束-->
View Code

9.配送方式的模板

<script type=‘text/html‘ id=‘deliveInfoTemplate‘>
            <%if(if_delivery == 0){%>
            <%=name%>:<b class="orange"><%=price%></b>(<%=description%>&nbsp;&nbsp;
            <%}else{%>
            <%=name%>:<b class="orange">该地区无法送达</b>
            &nbsp;&nbsp;
            <%}%>
        </script>
View Code

10.商品价格模板

<!--商品价格模板-->
        <script type=‘text/html‘ id=‘priceTemplate‘>
        <%if(group_price){%>
        <li id=‘priceLi‘>
            会员价:<b class="price red2"><span class="f30" id="real_price"><%=group_price%></span></b> &nbsp;&nbsp;&nbsp;
            销售价:<s><%if(minSellPrice != maxSellPrice){%>¥<%=minSellPrice%> - ¥<%=maxSellPrice%><%}else{%>¥<%=sell_price%><%}%></s>
        </li>
        <%}else{%>
        <li id=‘priceLi‘>销售价:<b class="price red2"><span class="f30" id="real_price"><%if(minSellPrice != maxSellPrice){%>¥<%=minSellPrice%> - ¥<%=maxSellPrice%><%}else{%>¥<%=sell_price%><%}%></span></b></li>
        <%}%>
        </script>
View Code

11.购买区域

<!--购买区域-->
        <div class="current">
        {if:$store_nums <= 0}
            该商品已售完,不能购买,您可以看看其它商品!(<a href="{url:/simple/arrival/goods_id/$id}" class="orange">到货通知</a>)
        {else:}
            {if:$spec_array}
            {set:$specArray = JSON::decode($spec_array);}
            {foreach:items=$specArray}
            <dl class="m_10 clearfix" name="specCols">
                <dt>{$item[‘name‘]}:</dt>
                <dd class="w_45" style="margin-left:67px;" id="specList{$item[‘id‘]}">
                    {set:$specVal=explode(‘,‘,trim($item[‘value‘],‘,‘))}
                    {foreach:items=$specVal item=$spec_value}
                    {if:$item[‘type‘] == 1}
                    <div class="item w_27"><a href="javascript:void(0);" onclick="sele_spec(this);" value=‘{"id":"{$item[‘id‘]}","type":"{$item[‘type‘]}","value":"{$spec_value}","name":"{$item[‘name‘]}"}‘ >{$spec_value}<span></span></a></div>
                    {else:}
                    <div class="item"><a href="javascript:void(0);" onclick="sele_spec(this);" value=‘{"id":"{$item[‘id‘]}","type":"{$item[‘type‘]}","value":"{$spec_value}","name":"{$item[‘name‘]}"}‘ ><img src="{webroot:$spec_value}" width=‘30px‘ height=‘30px‘ /><span></span></a></div>
                    {/if}
                    {/foreach}
                </dd>
            </dl>
            {/foreach}
            {/if}

            <dl class="m_10 clearfix">
                <dt>购买数量:</dt>
                <dd>
                    <input class="gray_t f_l" type="text" id="buyNums" onblur="checkBuyNums();" value="1" maxlength="5" />
                    <div class="resize">
                        <a class="add" href="javascript:modified(1);"></a>
                        <a class="reduce" href="javascript:modified(-1);"></a>
                    </div>
                </dd>
            </dl>

            {if:isset($spec_array) && $spec_array}
            <p class="m_10">已选择:<span class="orange bold" id="specSelected"></span></p>

            <!--货品规格模板-->
            <script type=‘text/html‘ id=‘selectedSpecTemplate‘>
                <%if(type == 1){%>
                    <span id="selectedSpan<%=id%>">“<%=value%>”</span>
                <%}else{%>
                    <span id="selectedSpan<%=id%>"><img class="img_border" src="{webroot:<%=value%>}" width="30px" height="30px" /></span>
                <%}%>
            </script>
            {/if}

            <input class="submit_buy" type="button" id="buyNowButton" onclick="buy_now();" value="立即购买" />

            {if:$promo==‘‘}
            <div class="shop_cart" style="z-index:1">
                <input class="submit_join" type="button" id="joinCarButton" onclick="joinCart();" value="加入购物车" />

                <div class="shopping" id="product_myCart" style=‘display:none‘>
                    <dl class="cart_stats">
                        <dt class="gray f14 bold">
                            <a class="close_2 f_r" href="javascript:closeCartDiv();" title="关闭">关闭</a>
                            <img src="{skin:images/front/right_s.gif}" width="24" height="24"  />成功加入购物车
                        </dt>
                        <dd class="gray">目前选购商品共<b class="orange" name=‘mycart_count‘></b>件<span>合计:<b name=‘mycart_sum‘></b></span></dd>
                        <dd><a class="btn_blue bold" href="{url:/simple/cart}">进入购物车</a><a class="btn_blue bold" href="javascript:void(0)" onclick="closeCartDiv();">继续购物>></a></dd>
                    </dl>
                </div>
            </div>
            {/if}
        {/if}
        </div>

    </div>
View Code

12.放大镜

<!--图片放大镜-->
    <div class="preview">
        <div class="pic_show" style="width:435px;height:435px;position:relative;z-index:5;padding-bottom:5px;">
            <a class="jqzoom" href="javascript:void(0)" rel=‘goodsPhoto‘ id="bigPicBox" alt="原图">
                <img src="{skin:images/front/nopic_435_435.gif}" style="border:none;width:435px;height:435px" id="smallPicBox" alt="缩略图" />
            </a>
        </div>

        <ul id="thumblist" class="pic_thumb">
            {foreach:items=$photo}
            <li>
                <a href=‘javascript:void(0);‘ rel="{gallery:‘goodsPhoto‘,smallimage:‘{webroot:}{echo:Thumb::get($item[‘img‘],435,435)}‘,largeimage:‘{webroot:$item[img]}‘}">
                    <img src=‘{webroot:}{echo:Thumb::get($item[‘img‘],60,60)}‘ width="60px" height="60px" />
                </a>
            </li>
            {/foreach}
        </ul>
    </div>
</div>

<div class="t_l">
    {if:isset($photo) && $photo}
    <a class="zoom blue" href="{url:/site/pic_show/id/$id}">点击看大图</a>
    {/if}
</div>
View Code

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。