免签约即时到帐支付接口

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

如下调用代码实现显示ECSHOP订单状态待付款、待发货、待收货、确认收货
// 订单待付款、待发货、待收货、确认收货
function get_ecshop_cx_order($type,$limit_statrt,$limit_end,$ecshop_cx)
{
    if ($type =='1') //全部订单
    {
        $ecshop_cx= '';
    }
    elseif ($type=='2') //待付款订单
    {   
        $ecshop_cx.='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_cx.= 'pay_status ='.PS_UNPAYED;
    }
    elseif ($type=='3') //待发货订单
    {
        $ecshop_cx.='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_cx.= 'shipping_status ='.SS_UNSHIPPED.' AND pay_status='.PS_PAYED;
    }
    elseif ($type=='4') //待收货订单
    {
        $ecshop_cx.='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_cx.= 'pay_status='.PS_PAYED.' AND shipping_status = '.SS_SHIPPED;
    }
    elseif ($type=='5') //待评论订单
    {
        $ecshop_cx.='order_status <> '.OS_INVALID.' AND '; //去掉无效订单
        $ecshop_cx.= '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_cx . "'";
    $result = $this->model->query($sql);
    return $result;
}

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

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

文章评论

暂无评论,来发表一个吧

发表 取消
充值有惊喜 ECSHOP插件网微信客服edait_cn