本文整理汇总了PHP中orders::retrieveOrdersProducts方法的典型用法代码示例。如果您正苦于以下问题:PHP orders::retrieveOrdersProducts方法的具体用法?PHP orders::retrieveOrdersProducts怎么用?PHP orders::retrieveOrdersProducts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类orders
的用法示例。
在下文中一共展示了orders::retrieveOrdersProducts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: statusName
}
//SP CONFIRM NEW ORDERS
//except for amazon and buyvip which we will generate on demand because we have
//to upload manually the confimation file to their website
//TODO: move from manual confirmation to here
//JNG CONFIRM ORDERS CANCELLATION
//need a new function to retrieve products for cancelation,
//but think of a general way to not return an array but the database result
//so the update and confirmation is sent per row which is much more safe.
//in the future we might use this method to run a query instead of always
//returning a full list as array, we always try to run in per row
$logger->write('- Confirm cancel status of JNG orders');
$cancel_status_unconfirmed = '10';
$cancel_status_confirmed = '12';
$cancel_status_name = statusName($cancel_status_confirmed);
$items = $class_o->retrieveOrdersProducts($cancel_status_unconfirmed);
$items_total = count($items);
if ($items_total == 0) {
$logger->write('There are no unconfirmed canceled found');
} else {
$logger->write("There are {$items_total} items need to be confirmed");
//Group Items per Order
$orders_cancelled = array();
foreach ($items as $i) {
if (!isset($orders_cancelled[$i['orders_id']])) {
$orders_cancelled[$i['orders_id']] = array();
}
$orders_cancelled[$i['orders_id']][] = $i['orders_products_id'];
}
$orders_total = count($orders_cancelled);
$logger->write("Total orders are {$orders_total}, processing per order:");