当前位置: 首页>>代码示例>>PHP>>正文


PHP orders::retrieveOrdersProducts方法代码示例

本文整理汇总了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:");
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:orders-confirmation.php


注:本文中的orders::retrieveOrdersProducts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。