本文整理汇总了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);
示例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;
}
}
}
}
}
示例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