
require_once template('header');
同left.html页面类似,多了一个相关文章。
...
foreach ($art_list as $val){
...
<a href="$val[url]" title="$val[title]">$val[subject]</a>
...
调用foreach ($art_list as $val),后台添加商品的时候设置。
$product[title] (商品名称) $product[addoption] (最新等小图片)
$product[free_delivery] (免费配送)
<p class="jqzoom"><img src="$product[goods_file2]" jqimg="$product[goods_file2]"
width="$mm_img_width" height="$mm_img_height" /></p>
(商品大图,要实现放大镜效果请不要修改这个class="jqzoom")
...
foreach ($gallery as $val){
...
<a href="$product[img_url]" target="_blank"><img src="$val[thumb]" alt="$val[img_desc]"
border="0" width="*"height="*" /></a>(商品小图)
...
<a href="javascript:sendcart(document.getElementsByName('goods')[0],'S');">
<img src="$imgpath/jrscj.gif" /></a> (加入收藏夹)
<a href="$product[img_url]" target="_blank"><img src="$imgpath/zoom1.gif" />
</a>(商品相册)
<a href="mailer.php?action=recommend&uid=$product[uid]" target="_blank">
<img src="$imgpath/tjhy.gif" /></a> (推荐好友)
$lang[event_priceb]:$product[goods_market_price] (市场价格)
$lang[buy_price]:$product[goods_sale_price] (销售价格)
...
foreach ($other_price as $val){
...
$val[title]:$val[price] (按会员等级不同的价格)
...
$lang[integral]:$product[goods_point] $lang[point] (赠送积分)
$lang[code]:$product[goods_code] (商品编码)
$lang[kg]:$product[goods_kg] kg (商品重量)
$lang[brand]:$product[goods_brand] (商品品牌)
$lang[supply]:$product[supply] (商品供货商)
$product[goods_advance] (商品简单介绍)
...
foreach ($attval_cart as $list){
...
$list[name]:
...
foreach ($list[value] as $val ){
...
<input name="att_value[$val[bute_id]]" id="att_value[$val[bute_id]]" type="radio"
value="$val[att_id]"> $val[title]( + $val[price]) (商品价格属性)
...
foreach ($attvalue as $val){
...
$val[att_name]:$val[att_value] (商品扩展属性)
...
$lang[buy_number]:<input name="ps_num" id="ps_num" type="text" align="absmiddle" value="1"
class="inp" size="1" /> (订购数量,不能删除,否则不能加入购物车)
<input maxlength="255" class="inp" size="35" value="$product[web_url]" name="url">
<input type="button" value="$lang[copy]" class="btn2" onclick="HighlightAll(this.form.url)">
(宣传代码)
<a href="javascript:;" id="add_cart" ><img src="$imgpath/xzgm.gif" />
</a> (购买,后面两行请不要删掉,否则不能从这边选择进入购物车,还是继续购物。)
<div class="clear"></div>
<div id="show_cart"></div>
需要的保留,不需要的可以直接删掉或者注释掉。
后台管理位置:商品管理》添加商品或者管理商品。
...
if (count($other_goods)>0){
...
foreach ($other_goods as $val){
...
<a href="$val[url]"><img src="$val[photo]" width="$cf_indexw" height="$cf_indexh"
alt="$val[title]" /></a><a href="$val[url]" title="$val[title]">$val[title]
$lang[buy_price]:$val[goods_sale_price]
$lang[code]:$val[goods_code]
...
if (count($other_goods)>0)判断是否有相关商品;foreach ($other_goods as $val)调用相关商品,里面的内容与最新商品的一样。
后台添加商品的时候可以选择添加相关商品。
...
foreach ($goods_tag as $val){
...
$val[tag_name]
...
<form action="tag.php" method="post" name="tag">
<input type="hidden" name="action" value="write" />
<input type="hidden" name="goods_id" value="$product[uid]" />
<input name="tag_name" class="inp" type="text" maxlength="120" />
<input name="" class="btn2" value="$lang[add_tag]" type="Submit"/>
</form>
调用foreach ($goods_tag as $val);$val[tag_name]标签名称;form是添加标签的标签。
<a href="$product[com_url]" target="_blank">$lang[all_comment]</a> (更多评论的链接)
...
foreach ($comment as $val) { (调用已有评论)
...
$lang[write_date]:$val[date] (评论时间) $lang[shop_user]:$val[name] (评论人)
[$val[comment_id]] (评论人的等级) $lang[comment_star]:$val[star] (评论星级)
<a href="comment.php?action=reply&uid=$val[uid]">[$lang[uesr_reply]]</a> (回复链接)
$lang[subject]:$val[title] (评论标题)
$val[conter] (评论内容)
...
if ($val[reply]!='') { (判断时候有回复)
foreach ($val[reply] as $list){ (回复列表)
...
$list[user_name] (回复人) [$list[user_id]] (回复人等级)
$list[reply_date] (回复时间)$list[reply_body] (恢复内容)
...
<form action="comment.php" method="post" name="mvmmall_comment" class="xg2">
(评论表单,以下内容不要随便删除)<input type="hidden" name="ps_mode" value="comment_write">
<input type="hidden" name="ps_goid" value="$product[uid]">
$lang[comment_msg] $lang[send_comment]
...
if($mm_comment_code==1){ (后台时候开启验证码,在商城设置》基本设置》评论设置)
...
$lang[captcha]:<input name="code" onkeyup="pressCaptcha(this)" type="text"
class="text" id="code" size="6" maxlength="8" />
<img align="absbottom" onmouseover="this.style.cursor='hand'" src="ajax.php?action=code"
alt="$lang[click_captcha]" border="1" onclick= this.src="ajax.php?action=code" />
...
$lang[subject]: <input name="subject" type="text" class="text" size="85" /> (评论标题)
$lang[comment_star]: (商品星级评分)
<input id="rate_0" type="radio" name="comment_star" value=" 5" checked="checked"/>
<IMG alt="" src="$imgpath/Egg_5.gif">
<input type="radio" name="comment_star" value="4" /<IMG alt="" src="$imgpath/Egg_4.gif">
<input type="radio" name="comment_star" value="3"/><IMG alt="" src="$imgpath/Egg_3.gif">
<input type="radio" name="comment_star" value="2"/><IMG alt="" src="$imgpath/Egg_2.gif">
<input type="radio" name="comment_star" value="1" /><IMG alt="" src="$imgpath/Egg_1.gif">
<textarea name="comment_body" cols="70" class="text" rows="8"></textarea> (填写评论内容)
<input class="btn2" type="submit" value="$lang[wite_announce]" />
<input type="reset" value="$lang[reset]" class="btn2" />
</form>
需要的保留,不需要的可以直接删掉或者注释掉。