本文整理汇总了PHP中OrderItem::isStatusOpen方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderItem::isStatusOpen方法的具体用法?PHP OrderItem::isStatusOpen怎么用?PHP OrderItem::isStatusOpen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderItem
的用法示例。
在下文中一共展示了OrderItem::isStatusOpen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
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);
$new_tracking_code++;
}
}
}
示例2: date
$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));
}
}
}
$value .= '</div>';
}
$value .= '</div>';
break;