开始之前,请确定你会使用FTP,以及熟悉 shopex 文件目录结构。熟悉shopEX后台模板编辑功能。
<script type="text/javascript" src="images/pngfix.js" mce_src="images/pngfix.js"></script>
{shoplogo}
修改如下:
<a href="http://www.shop.cn/index.html" target="_self"><img src="images/logo.jpg" mce_src="images/logo.jpg" alt="back to my shop"/></a>解析:删除了<script type=”text/javascript” src=”images/pngfix.js” src=”images/pngfix.js”></script>嵌入的Javascript脚本是为了让IE浏览器更好的支持PNG格式的图像。可将图像换为JPG或GIF格式,当然换成的LOGO要很好的融合顶部的背景。删除{shoplogo}调用,为程序的工作减轻了负担。
<meta name = "description" content = "{meta_description}">
<meta name = "keywords" content = "{meta_keywords}">
修改如下:
<meta name = "description" content = "{shoptitle}">
<meta name = "keywords" content = "{shoptitle}">
解析:这样做的原因是因为它原本的调用meta_keywords,meta_description是调用了首页的设置。所以使用shoptitle是更好的选择。
<div id="tabs"> <a style="cursor:hand;" onclick="expandcontent('sc1', this)"><span>Detail</span> </a><a style="cursor:hand;" onclick="expandcontent('sc2', this)"><span>Product Review</span></a><a style="cursor:hand;" onclick="expandcontent('sc3', this)"><span>Write a Review</span></a><a style="cursor:hand;" onclick="expandcontent('sc4', this)"><span>Send to Friend</span></a>
<div class="clear"></div>
</div>
<div id="container">
<div id="sc1" class="tabcontent">{TPL_GOODSDETAILS} </div>
<div id="sc2" class="tabcontent">{TPL_COMMENTSUM}{TPL_GOODSREVIEWCNT}</div>
<div id="sc3" class="tabcontent">{TPL_GOODSREVIEWPUB}</div>
<div id="sc4" class="tabcontent">{TPL_SENDTOFRIEND}</div>
</div>
修改如下:
<div id="container">
<div>{TPL_GOODSDETAILS} </div>
<div>{TPL_COMMENTSUM}{TPL_GOODSREVIEWCNT}</div>
<div>{TPL_GOODSREVIEWPUB}</div>
<div>{TPL_SENDTOFRIEND}</div>
</div>
删除同时注意去掉源码上部分的<script type=”text/javascript” src=”images/tabs.js”></script>。
解析:原模板设计如此的作用是以选项卡的方式显示商品详细信息、商品评论、写入评论和发送给朋友部分。修改的意义在于减少javascript代码和一些html代码,修改后商品详细信息、商品评论、写入评论和发送给朋友部分便依次在页面排开,更加直观。
以上修改通用官方模板。下面针对18号模板修改
<!--这里是头部显示出类别的层开始-->
{TPL_CATEGORY,TPL_CATEGORY,0}
<!--这里是头部显示出类别的层结束-->
<div id="IndexAllWrap">
<div id="top">
<div class="logo">{TPL_CLASS,TPL_LOGO}</div>
<div class="topinfo">
<dl>
<dt>{TPL_SELECTCURRENCY}</dt>
</dl>
<dl>
<dt><a href="shopbbs.dwt"><img src="images/indexshopbbs.gif" alt="Guestbook" width="25" height="33" border="0"/></a></dt>
</dl>
<dl>
<dt><a href="help.dwt"><img src="images/indexhelpbg.gif" alt="Help" border="0"/></a></dt>
</dl>
<dl >
<dt ><img src="images/indexloginbg.gif" alt="Login" id="indexloginspot" /></dt>
<dd>{TPL_LOGIN,TPL_INDEXLOGIN}</dd>
</dl>
<dl>
<dt><img src="images/cartbg.gif" alt="Shopping Info" /></dt>
<dd>{TPL_CARTLIST,TPL_CARTINFO}</dd>
</dl>
<div class="clear"></div>
</div>
</div>修改如下:
<div id="IndexAllWrap"> <div id="top">
<div class="logo">{TPL_CLASS,TPL_LOGO}</div> <div class="topinfo"><dl><dt><a href="./index.php?gOo=login.dwt"><img src="images/indexloginbg.gif" /></a></dt></dl>
<dl>
<dt><img src="images/cartbg.gif" /></dt>
<dd>{TPL_CARTLIST,TPL_CARTINFO}</dd>
</dl>
<dl>
<dt>{TPL_SELECTCURRENCY}</dt>
</dl>
<div class="clear"></div></div>我们将顶部菜单的分类和登录进行了修改,虽然他们看起来比较酷但我还是倾向于让页面的尺寸更小点。所以换成了固定的的链接。而不用那些调用以去掉相关Javascript代码。