怎样做出这样的限时抢购出来
2016-07-07 15:02 来源:www.chinab4c.com 作者:ecshop专家
我在一遍“超简单可用仿京东商城 限时抢购多个促销商品倒计时特效代码下载” http://bbs.ecshop.com/viewthread.php?tid=115004&highlight=%CF%DE%CA%B1 采用了代码,不过再不能实现文章中的功能,反而在主页头部出现了一大堆“/** * 获得指定分类促销商品,带倒计时信息 * * @access public * @return array */ function myget_promote_goods($cats = '') { $time = gmtime(); $order_type = $GLOBALS['_CFG']['recommend_order']; /* 取得促销lbi的数量限制 */ $num = get_library_number("recommend_promotion"); $sql = 'SELECT g.goods_id, g.goods_name, g.goods_number,g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, ' . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ". "promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, goods_img, b.brand_name, " . "g.is_best, g.is_new, g.is_hot, g.is_promote, RAND() AS rnd " . 'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' . 'LEFT JOIN ' . $GLOBALS['ecs']->table('brand') . ' AS b ON b.brand_id = g.brand_id ' . "LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ". "ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ". 'WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 ' . " AND g.is_promote = 1 AND promote_start_date <= '$time' AND promote_end_date >= '$time' "; $sql .= $order_type == 0 ? ' ORDER BY g.sort_order, g.last_update DESC' : ' ORDER BY rnd'; $sql .= " LIMIT $num "; $result = $GLOBALS['db']->getAll($sql); $goods = array(); foreach ($result AS $idx => $row) { if ($row['promote_price'] > 0) { $promote_price = bargain_price($row['promote_price'], $row['promote_start_date'], $row['promote_end_date']); $goods[$idx]['promote_price'] = $promote_price > 0 ? price_format($promote_price) : ''; } else { $goods[$idx]['promote_price'] = ''; } $goods[$idx]['id'] = $row['goods_id']; $goods[$idx]['name'] = $row['goods_name']; $goods[$idx]['num'] = $row['goods_number']; $goods[$idx]['brief'] = $row['goods_brief']; $goods[$idx]['brand_name'] = $row['brand_name']; $goods[$idx]['goods_style_name'] = add_style($row['goods_name'],$row['goods_name_style']); $goods[$idx]['short_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name']; $goods[$idx]['short_style_name'] = add_style($goods[$idx]['short_name'],$row['goods_name_style']); $goods[$idx]['market_price'] = price_format($row['market_price']); $goods[$idx]['shop_price'] = price_format($row['shop_price']); $goods[$idx]['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true); $goods[$idx]['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']); $goods[$idx]['url'] = build_uri('goods', array('gid' => $row['goods_id']), $row['goods_name']); //设置时间 if ($time >= $row['promote_start_date'] && $time <= $row['promote_end_date']) { $goods[$idx]['gmt_end_time'] = $row['promote_end_date']; } else { $goods[$idx]['gmt_end_time'] = 0; } } return $goods; } Loading... 诺基亚N96 ”这样的代码 我用的是360模板(gbk) 请问这样实现如图所示的功能 |
回答:
期待答案??? |
这个功能,需要付费,才有人给做吧。呵呵。 |
这个要该代码了 |
最近更新
常用插件
- 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成功
ecshop油画
ecshoplittle
ecshop多功能
ecshop为您节省
ecshop输入网址
ecshopCOCO
ecshop错误信息
ecshopchrome
ecshopIII
ecshop简体字
ecshopnumber
ecshop下载
ecshop百度知道
ecshopsearch
ecshopword
ecshopmate
ecshopUnavailable
ecshop感谢
ecshopCCES
ecshop代码分享
ecshop评论管理
ecshop2.6.2分类树
ecshop网站优化
ecshop动态网页
ecshop流言板
ecshop任务
_initFindParams
ecshop淘客网站