1. First open the index.php file and add the following:
function Index_get_exchange ($limit =3, $ishot =0) {$sql _ishot= $ishot?"and eg.is_hot=1":""; $sql='SELECT g.goods_id, G.goods_name, G.goods_name_style, Eg.exchange_integral,' .'G.goods_type,g.goods_brief, G.goods_thumb, g.goods_img, Eg.is_hot' .' from'. $GLOBALS ['ECS']->table ('Exchange_goods') .'As eg left JOIN'. $GLOBALS ['ECS']->table ('Goods') .'As g on g.goods_id = eg.goods_id' .'WHERE Eg.is_exchange = 1 and g.is_delete = 0'. $sql _ishot.'Limit'. $limit; $res= $GLOBALS ['DB']->GetAll ($sql); $arr=Array (); foreach($res as $idx =$row) {$arr [$idx] ['name'] = $row ['Goods_name']; $arr [$IDX] ['Goods_brief'] = $row ['Goods_brief']; $arr [$IDX] ['Goods_style_name'] = Add_style ($row ['Goods_name'], $row ['Goods_name_style']); $arr [$idx] ['exchange_integral'] = $row ['exchange_integral']; $arr [$IDX] ['type'] = $row ['Goods_type']; $arr [$IDX] ['Goods_thumb'] = Get_image_path ($row ['goods_id'], $row ['Goods_thumb'],true), $arr [$idx] ['goods_img'] = Get_image_path ($row ['goods_id'], $row ['goods_img']); $arr [$idx] ['URL'] = Build_uri ('Exchange_goods', Array ('GID'= = $row ['goods_id']), $row ['Goods_name']); } return$arr;}
2. Then find it in about 127 rows
$smarty->assign ('auction_list', Index_get_auction ());//Auction Events$smarty->assign ('Shop_notice', $_cfg['Shop_notice']);//Shop Announcementsfollow the above and add: $smarty->assign ('goods_exchange_list', Index_get_exchange (Ten,0));//Point MallNote: 10 indicates that 10 data is displayed
3. Then open the index.dwt file, plus:
<!--points Mall list--><divclass="Box"> <divclass="box_1"> "/exchange.php" class="f6"> Points Mall </a></span>class="Centerpadd"> <divclass="Clearfix Goodsbox"style="Border:none;"> <!--{foreachName=goods_exchange_list from= $goods _exchange_list item=exchange_goods}--> <divclass="Goodsitem"> <a href="{$exchange _goods.url}"target="_blank">"{$exchange _goods.goods_thumb}"alt="{$exchange _goods.goods_name}" class="goodsimg"/></a><br/> <p><a href="{$exchange _goods.url}"target="_blank"> <!--{if$exchange _goods.goods_style_name}-<fontclass="f3">{$exchange _goods.goods_style_name}</font><br/> <!--{Else--<fontclass="f3">{$exchange _goods.goods_name}</font><br/> <!--{/if}-</a> </p>{$lang. exchange_integral}<fontclass=" Price">{$exchange _goods.exchange_integral}</font> </div> <!--{/foreach}--> <divclass=" More"><a href="/exchange.php">"Images/more.gif"/></a></div> </div> </div> </div></div><divclass="Blank5"></div>
Ecshop a product or a hot item in a point store