ECSHOP调用显示订单状态【订单待付款、待发货、待收货、确认收货】

如下调用代码实现显示ECSHOP订单状态待付款、待发货、待收货、确认收货
// 订单待付款、待发货、待收货、确认收货
function get_ecshop_vc_order($type,$limit_statrt,$limit_end,$ecshop_vc)
{
    if ($type =='1') //全部订单
    {
        $ecshop_vc = '';
    }
    elseif ($type=='2') //待付款订单
    {   
        $ecshop_vc .='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_vc .= 'pay_status ='.PS_UNPAYED;
    }
    elseif ($type=='3') //待发货订单
    {
        $ecshop_vc .='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_vc .= 'shipping_status ='.SS_UNSHIPPED.' AND pay_status='.PS_PAYED;
    }
    elseif ($type=='4') //待收货订单
    {
        $ecshop_vc .='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_vc .= 'pay_status='.PS_PAYED.' AND shipping_status = '.SS_SHIPPED;
    }
    elseif ($type=='5') //待评论订单
    {
        $ecshop_vc .='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_vc .= 'pay_status='.PS_PAYED.' AND shipping_status = '.SS_RECEIVED;
    }
    $sql = "SELECT * FROM " .$GLOBALS['ecs']->table('order_info'). " WHERE user_id = '" . $_SESSION['user_id'] . "' AND product_id = '" . $ecshop_vc . "'";
    $result = $this->model->query($sql);
    return $result;
}

本文原创地址:https://www.ecshop.cx/article-371.html
版权所有 © 转载时必须以链接形式注明出处!

觉得本文对您有用,想收藏下来!方法很简单:请点击-〉
我们一直坚持白天工作、晚上熬夜更新资源,付出了巨大的精力和时间,其中的辛酸难以言述。

实时购买动态 ×

匿名网友 在 2019-04-09 购买了 ECSHOP支付宝当面付插件【支持个人申请支付宝当面付接口】