ECSHOP发货滚动,显视发货人,配送方式名,配送单号及发货日期

演示效果:

 

修改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;

}

 

这样修改,可以避免,因为运单号有链接,造成运单号另起一行。

posted on 2013-01-26 18:10  ECshop商城二次开发博客  阅读(1525)  评论(0编辑  收藏  举报

导航