分类分类
更新时间:2026-02-18 20:45:36作者:fang
今天给大家介绍一篇文章叫修改ecshop,实现不间断滚动的发货通知,分享给大家供大家参考。具体如下:
1、模板用的是用taobao MALL ,使用其他模板的朋友,稍改下就可以了,代码也很简单。
2、打开根目录下的index.php,找到:
$smarty->assign('invoice_list', index_get_invoice_query()); // 发货查询
在下面添加一行:
$smarty->assign('post_list', index_get_post_query()); // 发货通知
再找到:
/*------------------------------------------------------ */
//-- PRIVATE FUNCTIONS
/*------------------------------------------------------ */
在下面添加以下代码:
/**
* 调用发货公告查询
*
* @access private
* @return array
*/
function index_get_post_query()
{
$sql = 'SELECT order_sn, user_name,action_note FROM ' . $GLOBALS['ecs']->table('order_info') . ' JOIN (' . $GLOBALS['ecs']->table('users') . ',' .
$GLOBALS['ecs']->table('order_action') . ') ON (' . $GLOBALS['ecs']->table('users') . '.user_id=' . $GLOBALS['ecs']->table('order_info') . '.user_id
AND ' . $GLOBALS['ecs']->table('order_action') . '.order_id=' . $GLOBALS['ecs']->table('order_info') . '.order_id) WHERE ' . $GLOBALS['ecs']->table
('order_info') . '.shipping_status = 1 ORDER BY shipping_time DESC LIMIT 10';
$postinfo = $GLOBALS['db']->getAll($sql);
clearstatcache();
return $postinfo;
}
3、在使用模板里面的library目录里,新建一个post_list.lbi的文件,把以下代码复制到这个文件里面去!
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<DIV id=demo style="overflow:hidden;height :220px;width :200px;">
<DIV id=demo1>
<!-- 发货公告{foreach from=$post_list item=post} -->
<font color=red>{$post.user_name}</font> 您好,您所购物品将于 <font color=red>{$post.action_note}
</font> 发出,我们预先短信通知您,请注意查收!<br>---------------------------------<br>
<!-- 发货公告{/foreach}-->
</DIV>
<DIV id=demo2>
</DIV>
</DIV>
</DIV>
<SCRIPT>
var speed=100
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else{
demo.scrollTop++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function(){clearInterval(MyMar)}
demo.onmouseout=function(){MyMar=setInterval(Marquee,speed)}
</SCRIPT>
4、然后打开index.dwt,找到:
<div class="NewsList tc">
把下面的那段代码改为:
<!-- #BeginLibraryItem "/library/post_list.lbi" --><!-- #EndLibraryItem -->
这样就行了,其他的模板根据自己喜欢,把上面那段代码放到你想要的地方去!
相关
归墟战纪策略游戏262.92 MBv3.95802026-02-14
下载爆裂老奶策略游戏209.43 MBv1.0.112026-02-14
下载超能下蛋鸭策略游戏395.4 MBv1.2.82026-02-14
下载你好盒子实用工具12.1 MBv2.2.852026-02-14
下载我在峡谷当牛马休闲益智87.95 MBv0.7.12026-02-14
下载抽卡监狱2策略游戏190.75 MBv1.4.92026-02-14
下载Campus社交通讯94.36 MBv1.19.02026-02-14
下载冒险传奇角色扮演141.73 Mv9991.12026-02-14
下载心动次元app社交通讯43.96 Mv1.0.1.32026-02-14
下载致亲爱的我角色扮演1.63Gv1.02026-02-14
下载狼伴侣游戏手机版冒险游戏155.6 Mv1.02026-02-14
下载Loclike社交通讯169.08 Mv2.2.112026-02-14
下载










