本文整理汇总了PHP中orders::retrieveOpenOrdersProducts方法的典型用法代码示例。如果您正苦于以下问题:PHP orders::retrieveOpenOrdersProducts方法的具体用法?PHP orders::retrieveOpenOrdersProducts怎么用?PHP orders::retrieveOpenOrdersProducts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类orders
的用法示例。
在下文中一共展示了orders::retrieveOpenOrdersProducts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$order_key = $orders_priority[$priority] . $priodate . $oi['type'] . 'O' . $oi['jng_sp_orders_id'];
if (!isset($orders[$order_key])) {
$orders[$order_key] = array();
}
$orders[$order_key][$oiid] = $oi;
$orders_type[$order_key] = $oi['type'];
$orders_total[$order_key] = $oi['order_item_total'];
$orders_id_col[$order_key] = $oi['jng_sp_orders_id'];
$orders_allowed_to_override_booking[$order_key] = $priority == 'TP' || $oi['jng_sp_id'] == '7';
$temp_order_date[$oi['type'] . '-' . $oiid] = $priodate;
$temp_jng_sp_id[$oi['type'] . '-' . $oiid] = $oi['jng_sp_id'];
$temp_import_timestamp[$oi['type'] . '-' . $oiid] = $import_timestamp;
}
}
//JNG ORDERS
$oi_jng = $class_o->retrieveOpenOrdersProducts();
foreach ($oi_jng as $oiid => $oi) {
//SAVE CURRENT ITEM STARS FOR NEW ORDERS IF NOT YET SET BEFORE
if ($oi['status'] == '1' && $oi['products_stars'] == 0 && $oi['stars'] > 0) {
$class_o->updateProductStars($oiid, $oi['stars']);
}
//OTHER THEN ZALANDO, ORDERS NEED TO BE HOLD FOR A SPECIFIC TIME
//($duration_hold_not_zalando_orders), JG RULE BASED ON ORDER DATE
$order_timestamp = strtotime($oi['date_purchased']);
if ($timestamp_raw > $order_timestamp + $duration_hold_not_zalando_orders) {
$oi['order_quantity'] = intval($oi['products_quantity']);
if ($oi['ds_prioritized'] == '1') {
$priority = 'TP';
} else {
$priority = $oi['status'] == '8' ? 'WO' : $oi['type'];
}