我想在auction_list.dwt里的商品列表添加商品的当前价
2016-07-07 15:02 来源:www.chinab4c.com 作者:ecshop专家
lib_goods.php里的 /* 当前价 */ $auction['current_price'] = isset($auction['last_bid']) ? $auction['last_bid']['bid_price'] : $auction['start_price']; $auction['formated_current_price'] = price_format($auction['current_price'], false); return $auction; 蓝色这段怎么移植到auction.php绿色这段里,我想在auction_list.dwt里的商品列表添加商品的当前价 /** * 取得某页的拍卖活动 * @paramint$size每页记录数 * @paramint$page当前页 * @returnarray */ function auction_list($size, $page) { $auction_list = array(); $auction_list['finished'] = $auction_list['finished'] = array(); $now = gmtime(); $sql = "SELECT a.*, IFNULL(g.goods_thumb, '') AS goods_thumb " . "FROM " . $GLOBALS['ecs']->table('goods_activity') . " AS a " . "LEFT JOIN " . $GLOBALS['ecs']->table('goods') . " AS g ON a.goods_id = g.goods_id " . "WHERE a.act_type = '" . GAT_AUCTION . "' " . "AND a.start_time <= '$now' AND a.end_time >= '$now' AND a.is_finished < 2 ORDER BY a.act_id DESC"; $res = $GLOBALS['db']->selectLimit($sql, $size, ($page - 1) * $size); while ($row = $GLOBALS['db']->fetchRow($res)) { $ext_info = unserialize($row['ext_info']); $auction = array_merge($row, $ext_info); $auction['status_no'] = auction_status($auction); $auction['start_time'] = local_date($GLOBALS['_CFG']['time_format'], $auction['start_time']); $auction['end_time']= local_date($GLOBALS['_CFG']['time_format'], $auction['end_time']); $auction['formated_start_price'] = price_format($auction['start_price']); $auction['formated_end_price'] = price_format($auction['end_price']); $auction['formated_deposit'] = price_format($auction['deposit']); $auction['goods_thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true); $auction['url'] = build_uri('auction', array('auid'=>$auction['act_id'])); if($auction['status_no'] < 2) { $auction_list['under_way'][] = $auction; } else { $auction_list['finished'][] = $auction; } } $auction_list = @array_merge($auction_list['under_way'], $auction_list['finished']); return $auction_list; } |
回答:
看不懂 ,等下楼的回答。。最好有详细的代码可以借我参考下。。 |
最近更新
常用插件
- ecshop二次开发详细页面生
插件介绍: ECSHOP系统,在很多时候,很多商品没有人购买,不但购买的人...
- ecshop商品分类名称增加样
ecshop插件介绍:本插件可以方便在后台管理,为ecshop商品分类名称增加样...
- ecshop2.7.1打印发货单插件
ecshop2.7.1打印发货单插件介绍:ecshop2.7.1和以前的ecshop版本不一样,ecs...
- ecshop二次商品订购人信息
ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的...
- ecshop分类批量扩展插件
ecshop分类批量扩展插件,这个插件是ecshop插件里面比较核心的插件。我们...
ecshop热门问答
ecshop热门资料
ecshop朋友
批量扩展
ecshop减压
ecshopPUBLIC
ecshop中老年人
ecshop后台管理员
ecshopeaccelerator
ecshop欢迎页
ecshop教育局
ecshopMPC
ecshopexceeds
ecshop调用商品销量
ecshop会员卡
ecshop请多多帮助
ecshop会员
ecshop弹出效果
ecshopHAS
zencart左边栏
ecshop排序
ecshop超好看
ecmall插件
ecshopEC无法注册会员
ecshop来宾
ecshop礼品安全套
ecshop怀念
ecshop问题搜索
ecshop七夕
ecshop专业网站
ecshop照片上载
ecshop预设