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


PHP orders::productStatusIsCancelled方法代码示例

本文整理汇总了PHP中orders::productStatusIsCancelled方法的典型用法代码示例。如果您正苦于以下问题:PHP orders::productStatusIsCancelled方法的具体用法?PHP orders::productStatusIsCancelled怎么用?PHP orders::productStatusIsCancelled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在orders的用法示例。


在下文中一共展示了orders::productStatusIsCancelled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explode

    //	$invoice_id = tep_db_prepare_input($_GET['id']);
    //	$invoice = $class_mi->retrieveDetail($invoice_id);
    //	$orders_array = array($invoice['orders_id']);
    //
    $orders = tep_db_prepare_input($_GET['id']);
    $orders_array = explode(',', $orders);
} else {
    exit;
}
$order_counter = 0;
foreach ($orders_array as $order_id) {
    $pdf->AddPage();
    $order = $class_o->retrieveDetail($order_id, true);
    $items = $class_o->retrieveProducts($order_id, true);
    foreach ($items as $key => $item) {
        if ($class_o->productStatusIsCancelled($item['status'])) {
            unset($items[$key]);
        }
    }
    $print_delivery_note = false;
    $class_pi = new payone_invoice();
    //        echo "<pre>";var_dump($items);die();
    if (strtoupper($order['payment_method']) == strtoupper(PAYMENT_METHOD_BANK_TRANSFER)) {
        //Vorkasse
        $class_pi->createFromOrderJNG($order, $items, '+1 month');
    } elseif (strtoupper($order['payment_method']) == strtoupper(PAYMENT_METHOD_DIRECT_DEBIT)) {
        //Bankeinzug
        $class_pi->createFromOrderJNG($order, $items, '+0 days');
    } elseif (strtoupper($order['payment_method']) == strtoupper(PAYMENT_METHOD_INVOICE)) {
        //Rechnung
        $class_pi->createFromOrderJNG($order, $items);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:invoices-pdf.php

示例2: intval

             if (!$class_jo->statusIsCancelled($item['status']) && in_array($item['jng_sp_orders_items_id'], $items_array)) {
                 $ptext = intval($item['order_quantity']) . ' x ' . $item['article_number'];
                 //Go to col 2 when total items > pmax
                 //if(count($pcol1)<$pmax) $pcol1[] = $ptext;
                 //else $pcol2[] = $ptext;
                 //Go to col 2 on even counter
                 $item_counter++;
                 if ($item_counter % 2 != 0) {
                     $pcol1[] = $ptext;
                 } else {
                     $pcol2[] = $ptext;
                 }
             }
         } else {
             //PROCESS ITEMS JNG
             if (!$class_o->productStatusIsCancelled($item['status']) && in_array($item['orders_products_id'], $items_array)) {
                 $ptext = intval($item['products_quantity']) . ' x ' . $item['products_model'];
                 //Go to col 2 when total items > pmax
                 //if(count($pcol1)<$pmax) $pcol1[] = $ptext;
                 //else $pcol2[] = $ptext;
                 //Go to col 2 on even counter
                 $item_counter++;
                 if ($item_counter % 2 != 0) {
                     $pcol1[] = $ptext;
                 } else {
                     $pcol2[] = $ptext;
                 }
             }
         }
     }
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:package-labels.php

示例3: printPackageTip

     $result .= printPackageTip(EAN_MISMATCH_ERROR, $item['products_ean'], $ean_scan);
 } else {
     if ($item['status'] < intval($old_status)) {
         //If product status is not yet finish
         $errinfo = $template_error_not_finish;
         $result .= printPackageTip('E', $box_date, $errinfo, $sp_name, $sp_class);
     } elseif ($item['status'] == $old_status) {
         //If product status is finish
         $order = $class_o->retrieveDetail($item['orders_id']);
         $order_date = strtotime($order['date_purchased']);
         $box_date = date('d. M', $order_date);
         //Retrieve all products from the order
         $items = $class_o->retrieveProducts($order['orders_id']);
         foreach ($items as $key => $i) {
             //Exclude any canceled and complete products
             $iscanceled = $class_o->productStatusIsCancelled($i['status']);
             $iscomplete = $i['status'] == '9' || $i['status'] == '11';
             if ($iscanceled || $iscomplete) {
                 unset($items[$key]);
             } else {
                 $items[$key]['products_ean'] = $class_ean->getEAN($i['products_id'], $i['products_articles_id']);
             }
         }
         if ($item['order_item_total'] == '1' || count($items) == 1) {
             //If order only consist of 1 product
             $packages = $class_mp->getUsablePackages();
             if (count($packages) == 0) {
                 //If no usable package found for JNG, create 1
                 $package_id = $class_mp->createNew();
             } else {
                 //If usable package found fo JNG, use it
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:packaging.php


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