當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OrderItem::isStatusCancelConfirmed方法代碼示例

本文整理匯總了PHP中OrderItem::isStatusCancelConfirmed方法的典型用法代碼示例。如果您正苦於以下問題:PHP OrderItem::isStatusCancelConfirmed方法的具體用法?PHP OrderItem::isStatusCancelConfirmed怎麽用?PHP OrderItem::isStatusCancelConfirmed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OrderItem的用法示例。


在下文中一共展示了OrderItem::isStatusCancelConfirmed方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

 if (!is_null($order_no) && !is_null($external_item_id) && !is_null($new_status)) {
     if (!is_object($order) || $order_no != $prev_order_no) {
         $order = Order::loadObjectFromSalesPartnerOrderNo($jng_sp_id, $order_no);
     }
     if (!is_object($order)) {
         $logger->write('Can not find order: ' . $order_no);
     } else {
         $item = $order->getItemFromSalesPartnerItemReferenceNo($external_item_id);
         if (!is_object($item)) {
             $logger->write('Can not find item: ' . $external_item_id);
         } else {
             $logger->write('Current status: ' . $item->status);
             $status_update_valid = false;
             if ($item->status != $new_status) {
                 if ($new_status == OrderItem::STATUS_CANCEL) {
                     if (OrderItem::isStatusOpen($item->status) && !OrderItem::isStatusCancelConfirmed($item->status)) {
                         $status_update_valid = true;
                     }
                 } elseif ($new_status == OrderItem::STATUS_SENT_TO_CUSTOMER) {
                     if ((OrderItem::isStatusOpen($item->status) || OrderItem::isStatusCancel($item->status)) && !OrderItem::isStatusReturn($item->status)) {
                         $status_update_valid = true;
                     }
                 }
             }
             if ($status_update_valid) {
                 $item->updateStatus($new_status, $session_userinfo['username']);
                 $item_updated++;
                 $logger->write('Status updated!');
             }
             if (!is_null($tracking_code) && $tracking_code != '' && $order->getTrackingCodeShipment() != $tracking_code) {
                 $order->setTrackingCodeShipment($tracking_code);
開發者ID:blasiuscosa,項目名稱:manobo-2008,代碼行數:31,代碼來源:sp-orders-locals.php

示例2: date

     $value .= '<div>No Shipping Window</div>';
 } else {
     $value .= '<div>';
     $value .= '<abbr title="Shipping Window">Ship-Win</abbr>: ' . date('d.m', strtotime($i['shipping_window_open'])) . '-';
     $value .= !is_null($i['shipping_window_close']) ? date('d.m', strtotime($i['shipping_window_close'])) : 'N/A';
     $value .= '</div>';
 }
 $value .= '<div class="notice" style="margin-top:10px;">';
 $value .= '<div><abbr title="Lead Time">LT</abbr> Start: ' . date('d.m.Y H:i', strtotime($i['leadtime_start_date'])) . '</div>';
 $value .= '<div>Print Count/Confirmed: ' . $i['print_count'] . '/' . $i['print_confirmed'] . '</div>';
 $value .= '<div><abbr title="Last EAN Printed">LEP</abbr>: ' . ($i['ean_printed'] != '' ? date('d.m.Y H:i', strtotime($i['ean_printed'])) : 'no log yet') . '</div>';
 $value .= '</div>';
 if ($source == Order::ORDER_TYPE_SALES_PARTNER) {
     $confirmation_time_format = 'd.m.Y H:i';
     $value .= '<div class="notice" style="margin-top:10px;">' . '<strong>Confirmation to SP:</strong>' . '<br />Recieved: ' . date($confirmation_time_format, strtotime($item_object->getSPConfirmationTimeOrderReceived()));
     if (OrderItem::isStatusCancelConfirmed($item_object->status)) {
         $value .= '<br />Canceled: ' . date($confirmation_time_format, strtotime($item_object->getSPConfirmationTimeCancelOrDelivery()));
     } else {
         $delivery_confirmation_time = $item_object->getSPConfirmationTimeCancelOrDelivery();
         if (!OrderItem::isStatusOpen($item_object->status) && $delivery_confirmation_time > 0) {
             $value .= '<br />Delivered: ' . date($confirmation_time_format, strtotime($delivery_confirmation_time));
         }
     }
     if (OrderItem::isStatusReturn($item_object->status)) {
         $return_confirmation_time = $item_object->getSPConfirmationTimeReturnAsArray();
         foreach ($return_confirmation_time as $rct) {
             if ($rct > 0) {
                 $value .= '<br />Returned: ' . date($confirmation_time_format, strtotime($rct));
             }
         }
     }
開發者ID:blasiuscosa,項目名稱:manobo-2008,代碼行數:31,代碼來源:customer-care-order-detail.php


注:本文中的OrderItem::isStatusCancelConfirmed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。