您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程
ecshop数据库订单状态判断
安蕾2023-12-21 22:01:59ecshop商城教程已有人查阅
导读order_info 表 刚下完订单 order_status 0 shipping_status 0 pay_status 0 取消 order_status 2
ecshop数据库订单状态判断
order_info 表 刚下完订单 order_status 0 shipping_status 0 pay_status 0 取消 order_status 2 shipping_status 0 pay_status 0 确认 order_status 1 shipping_status 0 pay_status 0 已付款 order_status 1 shipping_status 0 pay_status 2 配货中 order_status 1 shipping_status 3 pay_status 2 已发货 order_status 5 shipping_status 1 pay_status 2 已收货 order_status 5 shipping_status 2 pay_status 2 退货 order_status 4 shipping_status 0 pay_status 0 /* 订单状态 */ define(‘OS_UNCONFIRMED’, 0); // 未确认 define(‘OS_CONFIRMED’, 1); // 已确认 define(‘OS_CANCELED’, 2); // 已取消 define(‘OS_INVALID’, 3); // 无效 define(‘OS_RETURNED’, 4); // 退货 /* 支付类型 */ define(‘PAY_ORDER’, 0); // 订单支付 define(‘PAY_SURPLUS’, 1); // 会员预付款 /* 配送状态 */ define(‘SS_UNSHIPPED’, 0); // 未发货 define(‘SS_SHIPPED’, 1); // 已发货 define(‘SS_RECEIVED’, 2); // 已收货 define(‘SS_PREPARING’, 3); // 备货中 /* 支付状态 */ define(‘PS_UNPAYED’, 0); // 未付款 define(‘PS_PAYING’, 1); // 付款中 define(‘PS_PAYED’, 2); // 已付款 $_LANG['os'][OS_UNCONFIRMED] = ‘未确认’;0 $_LANG['os'][OS_CONFIRMED] = ‘已确认’;1 $_LANG['os'][OS_CANCELED] = ‘ 取消‘;2 $_LANG['os'][OS_INVALID] = ‘无效‘;3 $_LANG['os'][OS_RETURNED] = ‘退货‘;4 $_LANG['ss'][SS_UNSHIPPED] = ‘未发货’; $_LANG['ss'][SS_PREPARING] = ‘配货中’; $_LANG['ss'][SS_SHIPPED] = ‘已发货’; $_LANG['ss'][SS_RECEIVED] = ‘收货确认’; $_LANG['ps'][PS_UNPAYED] = ‘未付款’; $_LANG['ps'][PS_PAYING] = ‘付款中’; $_LANG['ps'][PS_PAYED] = ‘已付款’; 订单的处理判断 while ($row = $GLOBALS['db']->fetchRow($res)) { // if ($row['order_status'] == OS_UNCONFIRMED) { $row['handler'] = "<a href=\"user.php?act=cancel_order&order_id=" .$row['order_id']. "\" onclick=\"if (!confirm('".$GLOBALS['_LANG']['confirm_cancel']."')) return false;\">".$GLOBALS['_LANG']['cancel']."</a>"; } else if ($row['order_status'] == OS_CONFIRMED) { /* 对配送状态的处理 */ if ($row['shipping_status'] == SS_SHIPPED) { @$row['handler'] = "<a href=\"user.php?act=affirm_received&order_id=" .$row['order_id']. "\" onclick=\"if (!confirm('".$GLOBALS['_LANG']['confirm_received']."')) return false;\">".$GLOBALS['_LANG']['received']."</a>"; } elseif ($row['shipping_status'] == SS_RECEIVED) { @$row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['ss_received'] .'</span>'; } else { if ($row['pay_status'] == PS_UNPAYED) { @$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['pay_money']. '</a>'; } else { @$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['view_order']. '</a>'; } } } else { $row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['os'][$row['order_status']] .'</span>'; }
order_info 表 刚下完订单 order_status 0 shipping_status 0 pay_status 0 取消 order_status 2 shipping_status 0 pay_status 0 确认 order_status 1 shipping_status 0 pay_status 0 已付款 order_status 1 shipping_status 0 pay_status 2 配货中 order_status 1 shipping_status 3 pay_status 2 已发货 order_status 5 shipping_status 1 pay_status 2 已收货 order_status 5 shipping_status 2 pay_status 2 退货 order_status 4 shipping_status 0 pay_status 0 /* 订单状态 */ define(‘OS_UNCONFIRMED’, 0); // 未确认 define(‘OS_CONFIRMED’, 1); // 已确认 define(‘OS_CANCELED’, 2); // 已取消 define(‘OS_INVALID’, 3); // 无效 define(‘OS_RETURNED’, 4); // 退货 /* 支付类型 */ define(‘PAY_ORDER’, 0); // 订单支付 define(‘PAY_SURPLUS’, 1); // 会员预付款 /* 配送状态 */ define(‘SS_UNSHIPPED’, 0); // 未发货 define(‘SS_SHIPPED’, 1); // 已发货 define(‘SS_RECEIVED’, 2); // 已收货 define(‘SS_PREPARING’, 3); // 备货中 /* 支付状态 */ define(‘PS_UNPAYED’, 0); // 未付款 define(‘PS_PAYING’, 1); // 付款中 define(‘PS_PAYED’, 2); // 已付款 $_LANG['os'][OS_UNCONFIRMED] = ‘未确认’;0 $_LANG['os'][OS_CONFIRMED] = ‘已确认’;1 $_LANG['os'][OS_CANCELED] = ‘ 取消‘;2 $_LANG['os'][OS_INVALID] = ‘无效‘;3 $_LANG['os'][OS_RETURNED] = ‘退货‘;4 $_LANG['ss'][SS_UNSHIPPED] = ‘未发货’; $_LANG['ss'][SS_PREPARING] = ‘配货中’; $_LANG['ss'][SS_SHIPPED] = ‘已发货’; $_LANG['ss'][SS_RECEIVED] = ‘收货确认’; $_LANG['ps'][PS_UNPAYED] = ‘未付款’; $_LANG['ps'][PS_PAYING] = ‘付款中’; $_LANG['ps'][PS_PAYED] = ‘已付款’; 订单的处理判断 while ($row = $GLOBALS['db']->fetchRow($res)) { // if ($row['order_status'] == OS_UNCONFIRMED) { $row['handler'] = "<a href=\"user.php?act=cancel_order&order_id=" .$row['order_id']. "\" onclick=\"if (!confirm('".$GLOBALS['_LANG']['confirm_cancel']."')) return false;\">".$GLOBALS['_LANG']['cancel']."</a>"; } else if ($row['order_status'] == OS_CONFIRMED) { /* 对配送状态的处理 */ if ($row['shipping_status'] == SS_SHIPPED) { @$row['handler'] = "<a href=\"user.php?act=affirm_received&order_id=" .$row['order_id']. "\" onclick=\"if (!confirm('".$GLOBALS['_LANG']['confirm_received']."')) return false;\">".$GLOBALS['_LANG']['received']."</a>"; } elseif ($row['shipping_status'] == SS_RECEIVED) { @$row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['ss_received'] .'</span>'; } else { if ($row['pay_status'] == PS_UNPAYED) { @$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['pay_money']. '</a>'; } else { @$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['view_order']. '</a>'; } } } else { $row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['os'][$row['order_status']] .'</span>'; }
本文标签:
很赞哦! ()
相关文章
随机图文
-
ecshop选择商品属 购买商品数量增加商品总价
各位ECSHOP网店系统用户大家好,欢迎来到代码号图文教程,今天为大家详细解说一下怎么给ECSHOP商品选择属 购买商品数量 以后显示商品总价的方法。 -
怎么删除meta name="Generator" content="ECSHOP v2.7.2"
大家可能都发现了,商城源代码里面有下面这样的代码。这个代码很不安全,很多网络罪犯就是利用版本信息来寻找漏洞入侵网站,并且对网站进行破坏的。 -
ecshop商品库存为0零右上角售空按钮销售结束功能的实现方法
当店铺的库存不足时,要及时在产品的列表页以及其他的位置显示售罄按钮。我在默认模板下完成了这个功能。 默认模板左上角都有个 best hot 这个按钮,是按照这个东西写的 -
ecshop商品详情页显示同类别下的推荐商品的方法
商品列表页顶部有一个“精品推荐”,但是在商品详情页默认是没有的,我想在商品详情页也显示该商品所属类别下的“精品推荐”,该如何修改呢?
留言与评论 (共有 条评论) |