ECSHOP发货滚动,显视发货人,配送方式名,配送单号及发货日期
时间:2024年01月31日
/来源:网络
/编辑:佚名
演示效果:
修改index.php 找到代码
复制代码
function index_get_invoice_query()
{
$sql = 'SELECT o.order_sn, o.invoice_no, s.shipping_code FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('shipping') . ' AS s ON s.shipping_id = o.shipping_id' .
" WHERE invoice_no > '' AND shipping_status = " . SS_SHIPPED .
' ORDER BY shipping_time DESC LIMIT 10';
复制代码
修改成
复制代码
function index_get_invoice_query()
{
$sql = 'SELECT o.order_sn, o.invoice_no, s.shipping_code,o.consignee, from_unixtime(o.shipping_time,\'%Y-%m-%d\') as shippingtime,o.shipping_name, r.region_name AS province FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('region') . ' AS r ON r.region_id = o.province' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('shipping') . ' AS s ON s.shipping_id = o.shipping_id' .
" WHERE invoice_no > '' AND shipping_status = " . SS_SHIPPED .
' ORDER BY shipping_time DESC LIMIT 10';
复制代码
再打开模板 invoice_query.lbi 文件,删除里面的所有文件,用以下代码代替
复制代码
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<!--{if $invoice_list}-->
<div class="fhgg">
<h2>发货通知</h2>
<div id="mq" class="scrollText" onmouseover="iScrollAmount=0" onmouseout="iScrollAmount=1">
<div class="mod3con">
<!-- 发货单查询{foreach name=invoice from=$invoice_list item=invoice} -->
<div class="vote">
<li class="f2">收货人:<span> {$invoice.consignee}</span></li>
<li class="f2">{$lang.order_number}:<span>{$invoice.order_sn}</span></li>
<li class="f2 kdbh">{$invoice.shipping_name}:<span>{$invoice.invoice_no}</span></li>
<li class="f2">发货时间:<span>{$invoice.shippingtime}</span></li>
</div>
<!-- 结束发货单查询{/foreach}-->
</div></div></div>
<script type="text/javascript">divheight("invoice");</script>
<!-- {/if} -->
<script type="text/javascript">
var oMarquee = document.getElementById("mq"); //滚动对象
var iLineHeight = 84; //单行高度,像素
var iLineCount = 10; //实际行数
var iScrollAmount = 1; //每次滚动高度,像素
function run() {
oMarquee.scrollTop += iScrollAmount;
if ( oMarquee.scrollTop == iLineCount * iLineHeight )
oMarquee.scrollTop = 0;
if ( oMarquee.scrollTop % iLineHeight == 0 ) {
window.setTimeout( "run()", 2000 );
} else {
window.setTimeout( "run()", 10 ); //滚动速度
}
}
oMarquee.innerHTML += oMarquee.innerHTML;
window.setTimeout( "run()", 2000 );
</script>
复制代码
因模板不同,CSS样式也不同,效果按模板去修改。
复制代码
/*-------发货通知------*/
.fhgg {
border:1px solid #ddd;
height:115px;
overflow:hidden;
position:relative;
width:198px;
}
.fhgg h2 {
height:28px;
line-height:28px;
color:#333;
font-weight:bold;
padding-left:15px;
border-bottom:1px solid #ddd;
background:url(images/fhgg.gif) repeat-x;
overflow:hidden;
}
.scrollText {
width:198px;
height:90px;
line-height:22px;
overflow:hidden;
}
.scrollText li {
padding:0 7px;
line-height:28px;
color:#666;
}
.scrollText li span {
color:#000;
}
.scrollText li.kdbh {
background-color:#eee;
}
复制代码
如果想去掉,配送方式运单号的链接,如下修改
includes\modules\shipping
在对应的配送方式里更改
一般在最后一行
把这个函数改成
function query($invoice_sn)
{
return $invoice_sn;
}
这样修改,可以避免,因为运单号有链接,造成运单号另起一行。
修改index.php 找到代码
复制代码
function index_get_invoice_query()
{
$sql = 'SELECT o.order_sn, o.invoice_no, s.shipping_code FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('shipping') . ' AS s ON s.shipping_id = o.shipping_id' .
" WHERE invoice_no > '' AND shipping_status = " . SS_SHIPPED .
' ORDER BY shipping_time DESC LIMIT 10';
复制代码
修改成
复制代码
function index_get_invoice_query()
{
$sql = 'SELECT o.order_sn, o.invoice_no, s.shipping_code,o.consignee, from_unixtime(o.shipping_time,\'%Y-%m-%d\') as shippingtime,o.shipping_name, r.region_name AS province FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('region') . ' AS r ON r.region_id = o.province' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('shipping') . ' AS s ON s.shipping_id = o.shipping_id' .
" WHERE invoice_no > '' AND shipping_status = " . SS_SHIPPED .
' ORDER BY shipping_time DESC LIMIT 10';
复制代码
再打开模板 invoice_query.lbi 文件,删除里面的所有文件,用以下代码代替
复制代码
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<!--{if $invoice_list}-->
<div class="fhgg">
<h2>发货通知</h2>
<div id="mq" class="scrollText" onmouseover="iScrollAmount=0" onmouseout="iScrollAmount=1">
<div class="mod3con">
<!-- 发货单查询{foreach name=invoice from=$invoice_list item=invoice} -->
<div class="vote">
<li class="f2">收货人:<span> {$invoice.consignee}</span></li>
<li class="f2">{$lang.order_number}:<span>{$invoice.order_sn}</span></li>
<li class="f2 kdbh">{$invoice.shipping_name}:<span>{$invoice.invoice_no}</span></li>
<li class="f2">发货时间:<span>{$invoice.shippingtime}</span></li>
</div>
<!-- 结束发货单查询{/foreach}-->
</div></div></div>
<script type="text/javascript">divheight("invoice");</script>
<!-- {/if} -->
<script type="text/javascript">
var oMarquee = document.getElementById("mq"); //滚动对象
var iLineHeight = 84; //单行高度,像素
var iLineCount = 10; //实际行数
var iScrollAmount = 1; //每次滚动高度,像素
function run() {
oMarquee.scrollTop += iScrollAmount;
if ( oMarquee.scrollTop == iLineCount * iLineHeight )
oMarquee.scrollTop = 0;
if ( oMarquee.scrollTop % iLineHeight == 0 ) {
window.setTimeout( "run()", 2000 );
} else {
window.setTimeout( "run()", 10 ); //滚动速度
}
}
oMarquee.innerHTML += oMarquee.innerHTML;
window.setTimeout( "run()", 2000 );
</script>
复制代码
因模板不同,CSS样式也不同,效果按模板去修改。
复制代码
/*-------发货通知------*/
.fhgg {
border:1px solid #ddd;
height:115px;
overflow:hidden;
position:relative;
width:198px;
}
.fhgg h2 {
height:28px;
line-height:28px;
color:#333;
font-weight:bold;
padding-left:15px;
border-bottom:1px solid #ddd;
background:url(images/fhgg.gif) repeat-x;
overflow:hidden;
}
.scrollText {
width:198px;
height:90px;
line-height:22px;
overflow:hidden;
}
.scrollText li {
padding:0 7px;
line-height:28px;
color:#666;
}
.scrollText li span {
color:#000;
}
.scrollText li.kdbh {
background-color:#eee;
}
复制代码
如果想去掉,配送方式运单号的链接,如下修改
includes\modules\shipping
在对应的配送方式里更改
一般在最后一行
把这个函数改成
function query($invoice_sn)
{
return $invoice_sn;
}
这样修改,可以避免,因为运单号有链接,造成运单号另起一行。
新闻资讯 更多
热门文章
- 178Moban源码谈谈免费源码与收费源码的区别
- 2帝国CMS忘记后台登陆用户名、密码、认证码的解决方法
- 3帝国CMS(EmpireCMS) v7.5后台任意代码执行漏洞及具体修复方法
- 4帝国CMS和WordPress 哪个好?哪个适合建站?
- 5如何解决Discuz的密码错误次数过多请15分钟后登陆的问题
- 6帝国cms灵动标签取得内容和栏目链接地址
- 7emlog pro 注册码“开心”教程(如果有一天,emlog官方版 或者 emlog免费版 跑路了,那用户怎么办?)
- 8织梦CMS在nginx下设置伪静态方法(附nginx伪静态规则)
- 9帝国cms后台登录出现”您还未登录”怎么解决?
- 10帝国cms7.5忘记登录密码 和忘记登录认证码以及多次登录 失败被锁定解决办法