2.7.1货到付款发货后找不到订单的临时解决方法

2016-07-07 15:26 来源:www.chinab4c.com 作者:ecshop专家



问题描述见:
http://bbs.ecshop.com/thread-116523-1-1.html

http://bbs.ecshop.com/viewthread.php?tid=117523


解决方法,includes/lib_order.php
2300行左右,找到function order_query_sql这个函数,用下面的替换即可。
  1. /**
  2. * 生成查询订单的sql
  3. * @paramstring$type类型
  4. * @paramstring$aliasorder表的别名(包括.例如 o.)
  5. * @returnstring
  6. */
  7. function order_query_sql($type = 'finished', $alias = '')
  8. {
  9. /* 已完成订单 */
  10. if ($type == 'finished')
  11. {
  12. return " AND {$alias}order_status " . db_create_in(array(OS_CONFIRMED, OS_SPLITED)) .
  13. " AND {$alias}shipping_status " . db_create_in(array(SS_SHIPPED, SS_RECEIVED)) .
  14. " AND {$alias}pay_status " . db_create_in(array(PS_PAYED, PS_PAYING)) . " ";
  15. }
  16. /* 待发货订单 */
  17. elseif ($type == 'await_ship')
  18. {
  19. return " AND{$alias}order_status " .
  20. db_create_in(array(OS_CONFIRMED, OS_SPLITED, OS_SPLITING_PART)) .
  21. " AND{$alias}shipping_status " .
  22. db_create_in(array(SS_UNSHIPPED, SS_PREPARING, SS_SHIPPED_ING)) .
  23. " AND ( {$alias}pay_status " . db_create_in(array(PS_PAYED, PS_PAYING)) . " OR {$alias}pay_id " . db_create_in(payment_id_list(true)) . ") ";
  24. }
  25. /* 待付款订单 */
  26. elseif ($type == 'await_pay')
  27. {
  28. return " AND{$alias}order_status " . db_create_in(array(OS_CONFIRMED, OS_SPLITED)) .
  29. " AND{$alias}pay_status = '" . PS_UNPAYED . "'" .
  30. " AND ( {$alias}shipping_status " . db_create_in(array(SS_SHIPPED, SS_RECEIVED)) . " OR {$alias}pay_id " . db_create_in(payment_id_list(false)) . ") ";
  31. }
  32. /* 未确认订单 */
  33. elseif ($type == 'unconfirmed')
  34. {
  35. return " AND {$alias}order_status = '" . OS_UNCONFIRMED . "' ";
  36. }
  37. /* 未处理订单:用户可操作 */
  38. elseif ($type == 'unprocessed')
  39. {
  40. return " AND {$alias}order_status " . db_create_in(array(OS_UNCONFIRMED, OS_CONFIRMED)) .
  41. " AND {$alias}shipping_status = '" . SS_UNSHIPPED . "'" .
  42. " AND {$alias}pay_status = '" . PS_UNPAYED . "' ";
  43. }
  44. /* 未付款未发货订单:管理员可操作 */
  45. elseif ($type == 'unpay_unship')
  46. {
  47. return " AND {$alias}order_status " . db_create_in(array(OS_UNCONFIRMED, OS_CONFIRMED)) .
  48. " AND {$alias}shipping_status " . db_create_in(array(SS_UNSHIPPED, SS_PREPARING)) .
  49. " AND {$alias}pay_status = '" . PS_UNPAYED . "' ";
  50. }
  51. /* 已发货订单:不论是否付款 */
  52. elseif ($type == 'shipped')
  53. {
  54. return " AND {$alias}order_status = '" . OS_CONFIRMED . "'" .
  55. " AND {$alias}shipping_status " . db_create_in(array(SS_SHIPPED, SS_RECEIVED)) . " ";
  56. }
  57. else
  58. {
  59. die('函数 order_query_sql 参数错误');
  60. }
  61. }
复制代码
经测试暂未发现异常,操作前注意备份文件。

回答:
支持下~


支持下~