首页 > 其他 > 详细

ecshop订单-》待付款,待发货,待收货,收货确认

时间:2015-11-30 13:07:08      阅读:323      评论:0      收藏:0      [点我收藏+]
// 订单 待付款、待发货、待收货、确认收货
    public function get_serch_order($type/*,$limit_statrt,$limit_end,$serch*/){
        $m =M()->pre.‘order_info‘;
        $userid = $_SESSION[‘user_id‘];
        
        if($type ==‘1‘){  // 全部订单
            //echo ‘111‘;
            $serch = ‘‘;    
        }elseif($type==‘2‘){   // 待付款订单
            //echo ‘222‘;
            $serch .=‘order_status <> ‘.OS_INVALID.‘ and ‘;   // 去掉无效订单
            $serch .= ‘pay_status =‘.PS_UNPAYED;
        }elseif($type==‘3‘){  //  待发货订单
            $serch .=‘order_status <> ‘.OS_INVALID.‘ and ‘;   // 去掉无效订单
            $serch .= ‘shipping_status =‘.SS_UNSHIPPED.‘ and pay_status=‘.PS_PAYED;    
        }elseif($type==‘4‘){ // 待收货订单
            $serch .=‘order_status <> ‘.OS_INVALID.‘ and ‘;   // 去掉无效订单
            $serch .= ‘pay_status=‘.PS_PAYED.‘ and shipping_status = ‘.SS_SHIPPED;        
        }elseif($type==‘5‘){  // 待评论订单
            $serch .=‘order_status <> ‘.OS_INVALID.‘ and ‘;   // 去掉无效订单
            $serch .= ‘pay_status=‘.PS_PAYED.‘ and shipping_status = ‘.SS_RECEIVED;    
        }
        
        $sql = ‘select * from ‘.$m.‘ where user_id=‘.$userid.‘ and ‘.$serch;    
        $result = $this->model->query($sql);
        return $result;
    }

 

ecshop订单-》待付款,待发货,待收货,收货确认

原文:http://www.cnblogs.com/wesky/p/5006792.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!