本文作者:kaifamei

京东抢货

更新时间:2023-04-06 09:10:37 人在看 0条评论

京东抢货

关于建军节的祝福语有哪些-


2023年4月6日发(作感觉头晕 者:童话故事)

===重新更新帖子里,把以前的删掉了====

安装方法如下:

_promote_goods()这个函数拷贝到includes/lib_中

/**

*获得指定分类促销商品,带倒计时信息

*

*@accesspublic

*@returnarray

*/

functionmyget_pr蝴蝶的蝶组词 omote_goods($cats='')

{

$time=gmtime();

$order_type=$GLOBALS['_CFG']['recommend_order'];

/*取得促销lbi的数量限制*/

$num=get_library_number("recommend_promotion");

$sql='_id,_name,_number,_name_style,

_price,_priceASorg_price,e_price,'.

"IFULL(_price,_price*'$_SESSIO[discount]')ASshop_price,".

"promote_start_date,promote_end_date,_brief,_thumb,goods_img,

_name,".

"_best,_new,_hot,_promote,RAD()ASrnd".

'FROM'.$GLOBALS['ecs']->table('goods').'ASg'.

'LEFTJOI'.$GLOBALS['ecs']->table('brand').'_id=_id

'.

"LEFTJOI".$GLOBALS['ecs']->table('member_price')."ASmp".

"_id=__rank='$_SESSIO[user_rank]'".

'_on_sale=_alone_sale=_delete=0'.

"_promote=1A月经不来怎么解决 Dpromote_start_date<='$time'ADpromote_end_date>=

'$time'";

$sql.=$order_type==0?'_order,_updateDESC':'ORDER

BYrnd';

$sql.="LIMIT$num";

$result=$GLOBALS['db']->getAll($sql);

$goods=array();

foreach($resultAS$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;

}

复制代码

2.新建一个文本文档名称为countdown_保存到library文件目录下内如如下:

限时抢购

goodslist[]={$promotion__end_time};

time_id[time_]="TimeCounter_{$}"

class="timeBox">{$_waiting}

src="/skin/df/i/icon_"/>

target="_blank">{$promotion_|escape:html}

color="#ff0000"/>

市场价:{$promotion__price}仅剩

{$promotion_}

抢购价:{$promotion_e_price}