本文整理汇总了PHP中get_order_finish函数的典型用法代码示例。如果您正苦于以下问题:PHP get_order_finish函数的具体用法?PHP get_order_finish怎么用?PHP get_order_finish使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_order_finish函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_all_delivery_finish
/**
* 判断订单的发货单是否全部发货
* @param int $order_id 订单 id
* @return int 1,全部发货;0,未全部发货;-1,部分发货;-2,完全没发货;
*/
function get_all_delivery_finish($order_id)
{
$return_res = 0;
if (empty($order_id)) {
return $return_res;
}
/* 未全部分单 */
if (!get_order_finish($order_id)) {
return $return_res;
} else {
// 是否全部发货
$sql = "SELECT COUNT(delivery_id)\n FROM " . $GLOBALS['ecs']->table('delivery_order') . "\n WHERE order_id = '{$order_id}'\n AND status = 2 ";
$sum = $GLOBALS['db']->getOne($sql);
// 全部发货
if (empty($sum)) {
$return_res = 1;
} else {
/* 订单全部发货中时:当前发货单总数 */
$sql = "SELECT COUNT(delivery_id)\n FROM " . $GLOBALS['ecs']->table('delivery_order') . "\n WHERE order_id = '{$order_id}'\n AND status <> 1 ";
$_sum = $GLOBALS['db']->getOne($sql);
if ($_sum == $sum) {
$return_res = -2;
// 完全没发货
} else {
$return_res = -1;
// 部分发货
}
}
}
return $return_res;
}
示例2: foreach
}
foreach ($goods_list as $key => $value) {
if ($value['extension_code'] == 'package_buy') {
unset($goods_list[$key]);
}
}
$_goods['goods_list'] = $goods_list + $_goods['goods_list'];
unset($goods_list);
/* 更新订单的虚拟卡 商品(虚货) */
$_virtual_goods = isset($virtual_goods['virtual_card']) ? $virtual_goods['virtual_card'] : '';
update_order_virtual_goods($order_id, $_sended, $_virtual_goods);
/* 更新订单的非虚拟商品信息 即:商品(实货)(货品)、商品(超值礼包)*/
update_order_goods($order_id, $_sended, $_goods['goods_list']);
/* 标记订单为已确认 “发货中” */
/* 更新发货时间 */
$order_finish = get_order_finish($order_id);
$shipping_status = SS_SHIPPED_ING;
if ($order['order_status'] != OS_CONFIRMED && $order['order_status'] != OS_SPLITED && $order['order_status'] != OS_SPLITING_PART) {
$arr['order_status'] = OS_CONFIRMED;
$arr['confirm_time'] = GMTIME_UTC;
}
$arr['order_status'] = $order_finish ? OS_SPLITED : OS_SPLITING_PART;
// 全部分单、部分分单
$arr['shipping_status'] = $shipping_status;
update_order($order_id, $arr);
}
/* 记录log */
order_action($order['order_sn'], $arr['order_status'], $shipping_status, $order['pay_status'], $action_note);
/* 清除缓存
clear_cache_files();
*/