EasyCart/模板制作(三)

来自站长百科
跳转至: 导航、​ 搜索

EasyCart | 模板制作 | 系统设置|分类管理|产品管理|会员订单管理|文章下载管理|权限维护

  • 网站前端产品页

/default/Home目录下的disp.html文件是产品页的模板

1、引入模板的头部

   <include file="Public:header" />

2、引入模板的左边部分

   <include file="Public:left" />

3、引入模板的底部

   <include file="Public:footer" />

4、面包屑的填写

    <a
    href="/">Home</a>

    <volist name="catep"
    id="vo"> > 

             <eq
    name="vo['id']" value="$cateinfo['id']">

                       {$vo.name}

               <else/>

                       <a
    href="{:build_url($vo,'cate_url')}"
    >{:build_url($vo,'cate_name')}</a>

             </eq>

    </volist>
    >

    {:build_url($list,'pro_name')}

5、产品放大镜填写

·引用[[CSS]文件

    <link rel="stylesheet" rev="stylesheet"
    href="../Public/Js/disp.css" />

    <link  href="../Public/css/fancybox/jquery.fancybox-1.3.4.css"
    rel="stylesheet" rev="stylesheet"  />
</nowiki>

·引用JS文件

<nowiki>
    <script
    language="JavaScript" type="text/javascript"
    src="../Public/Js/jqdisp.js"></script>

    <script
    src="../Public/css/fancybox/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>

    <script
    type="text/javascript">

    var isAjaxLogin =
    Boolean(parseInt("{:GetSettValue('isAjaxLogin')}"));

    var CartUrl='{:U('Cart/disp')}';

    </script>

·代码

    <div
    class="jqzoom" id="spec-n1"
    style="z-index:1;width:358px">

    <img src="{:build_url($list,'pro_bigimage')}"
    width="358" height="300"
    jqimg="{:build_url($list,'pro_bigimage')}"/> <br />

        <a
    rel="gallerys" href="{:build_url($list,'pro_bigimage')}"
    title="{:build_url($list,'pro_name')}">larger image</a>

      </div>

      <div
    id="spec-n5">

             <div
    class="control" id="spec-left"><img
    src="../Public/css/left.gif">  </div>

                       <div
    id="spec-list">

                                <div>

    <ul>

    <gt
    name="list['detailcount']" value="0">

         <iterate name="list['tempdetailpics']"
    id="vo">

                  <li>

    <a
    rel="gallerys" href="{$vo}"
    title="{:build_url($list,'pro_name')}">

    <img
    src="{$vo}" >

    </a>

    </li>

          </iterate>

          <else
    />

          <iterate
    name="gallerys" id="vo">

                   <li><a rel="gallerys"
    href="{:build_url($vo,'g_bigimage')}"
    title="{:build_url($list,'pro_name')}"><img
    src="{:build_url($vo,'g_bigimage')}" ></a></li>

         </iterate>

    </gt>               


             </ul>

    </div>

                       </div>

                       <div
    class="control" id="spec-right">

                                <img
    src="../Public/css/right.gif">

                       </div>

    </div>

6、产品信息填写

·产品名称:

   {:build_url($list,'pro_name')}

·产品编号:

   {$list.serial}

·产品价格:

   {:getprice($list['price'],$list['pricespe'],false)}

·产品库存状态:

   <eq name="list['isdown']" value="0">In
   Stock  <else />Out Of
   Stock</eq>

·产品详细信息:

   {$list.remark}

·产品属性:

      <table
    width="100%" border="0" cellspacing="0"
    cellpadding="0" class="attrlist"  >

                 <volist name="attrlist"
    id="vo">

                           <eq name="vo['input_type']"
    value="1">

                                       <tr>

                                                   <td
    align="center" height="25"
    valign="top">

                                                                               <strong>{$vo['name']}:</strong>

                                                   </td>

                                              <td>

                                                       <ul>

                                                                <iterate name="vo['attrs']"
    id="subvo">

                                                                         <li>

    <input class="{$subvo['attr_value']}"
    attrname="{$vo['name']}" type="radio"
    name="attr[{$vo['name']}]" id="{$subvo['id']}"
    value="{$subvo['attr_value']}__{$subvo['attr_price']}"
    style="display:none" msg="<notempty
    name="subvo['attr_price']">(<gt
    name="subvo['attr_price']">+</gt>{:getprice_str($subvo['attr_price'])})</notempty>"/>

                                                                          <a
    href="javascript:void(0)">

                                                                                         <notempty
    name="subvo['img_url']">

                                                                                                  <img
    src="__ROOT__/{$subvo['img_url']}" border="0"
    class="attr_img"
    width="31" height="31"/>

                                                                                         <else/>

                                                                                                {$subvo['attr_value']}

                                                                                         </notempty>

                                                                                </a>

                                                                         </li>

                                                                </iterate>

                                                          </ul>

                                                          <div
    id="{$vo['name']}" style="display:none"></div>

                                                 </td>

                                          </tr>

                               </eq>

                     </volist>


                       <tr><td
    id="attr_selected" align="left"
    colspan="2"></td></tr>

             </table>

·产品数量:

   <input
   name="count" value="1" type="text"
   style="width:60px;" />

·添加到购物车按钮:

    <a href="###"
    onclick="return jQuery.addtocart();" >

    <img
    src="../Public/images/button_buy.jpg" alt=""
    border="0" />

    </a>

·基于Ajax的添加到购物车:

    <a
    href="###"
    onclick="jQuery.savecart();" id="savecart" >

    <img src="../Public/images/button_in_cart.jpg"
    alt="" border="0"/>

    </a>

    <div
    id="cart_info">

        <div id="cart_alert"
    style="display:none"></div>

        <div id="cart_ok"  style="display:none">

                       <img
    src="../Public/images/add_ok.jpg" border="0"
    usemap="#Map">

                       <span
    class="cart_ok_content">Shopping Cart <a>{:itemCount()}</a>
    items Total {:getprice_str(cart_total())}</span>

                       <span><a
    href="###"
    onclick="location.href='{:U('Cart/disp')}';" ><img
    src="../Public/images/button_check.jpg" alt=""
    border="0" /></a>

                                <a
    href="###" onclick="jQuery.hide_cart_ok_content();"><img
    src="../Public/images/button_shopping.jpg" alt=""
    border="0" /></a>

                       </span>

                      

                       <map name="Map"
    id="Map">

                         <area shape="rect"
    coords="198,-1,214,13" href="###"
    onclick="jQuery.hide_cart_ok_content();" />

                       </map>

        </div>

    </div>

·添加到收藏:

    <a href="{:U('Member-Index/Addprofav',array('id'=>$list['id']))}">

    <img
    src="../Public/images/wishlist.gif" alt=""
    border="0" />

    </a>

·评论

    <a
    href="{:U('Pro/write_a_review',array('id'=>$list['id']))}">

    <img
    src="../Public/images/button_write_review.gif" alt="" border="0"
    />

    </a>

·向好友推荐:

    <a
    href="{:U('Pro/tell_a_friend',array('id'=>$list['id']))}">

    <img
    src="../Public/images/button_TellAFriend.gif" alt=""
    border="0" />

    </a>

·同类产品:

    <iterate name="sameclass"
    id="vo">

              <div class="g_pro">

                 <div class="g_pro_img">

    <a href="{:build_url($vo,'pro_url')}"
    title="{:build_url($vo,'pro_name')}" >

    <img
    src="{:build_url($vo,'pro_smallimage')}" width="160"
    height="160" />

    </a>

    </div>

                 <div class="g_pro_name">

    <a
    href="{:build_url($vo,'pro_url')}">{:build_url($vo,'pro_name')}</a>

    </div>

                 <div class="g_pro_pri">
    {:build_url($vo,'pro_price')}      </div>

             </div>

    </iterate>

参考来源[ ]

EasyCart使用手册导航

模板制作

模板制作(一)|模板制作(二)|模板制作(三)|模板制作(四)|模板制作(五)

系统设置

基本设置|支付设置|配送方式|折扣管理|货币设置|邮件设置|广告管理|网站地图|优惠券|区域封锁|邮件订阅|发货地址|数据库备份

分类管理

添加分类|分类列表|品牌管理|虚拟分类

产品管理

添加产品|产品列表|产品类型|批量CSV|网站留言|批量修改|批量上传|批量处理

会员订单管理

会员等级|会员列表|会员积分|订单列表

文章下载管理

新增文章|文章列表|文章类别

权限维护

节点管理|角色管理|用户管理