百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>Ecshop教程> 修改ecshop,实现不间断滚动的发货通知
分享文章到:

修改ecshop,实现不间断滚动的发货通知

发布时间:12/03 来源: 浏览: 关键词:

 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=100demo2.innerHTML=demo1.innerHTMLfunction Marquee(){if(demo2.offsetTop-demo.scrollTop<=0)demo.scrollTop-=demo1.offsetHeightelse{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 -->复制代码  这样就行了,其他的模板根据自己喜欢,把上面那段代码放到你想要的地方去!
打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有7人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板