本文整理汇总了PHP中orders::searchOrders方法的典型用法代码示例。如果您正苦于以下问题:PHP orders::searchOrders方法的具体用法?PHP orders::searchOrders怎么用?PHP orders::searchOrders使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类orders
的用法示例。
在下文中一共展示了orders::searchOrders方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: orders
<?php
use_class('orders');
$class_o = new orders();
//AJAX ACTION
if (isset($_POST['me_action']) && $_POST['me_action'] != '') {
if ($_POST['me_action'] == 'SEARCHORDERS') {
$search_field = tep_db_prepare_input($_POST['search_field']);
$search_keywords = tep_db_prepare_input(utf8_decode($_POST['search_keywords']));
$orders = $class_o->searchOrders($search_field, $search_keywords, "op.status NOT IN (9,10,11,12)");
$result = '';
if (count($orders) > 0) {
$itemStatus = $class_o->productStatusName();
$table = array();
$t = array();
$t['c'] = 'Order Info';
$t['a'] = 'Product Code';
$t['r'] = 'Cancel by';
$t['t'] = 'Action';
$table[] = $t;
foreach ($orders as $row) {
$order_date = strtotime($row['date_purchased']);
$item_count = "{$row['order_item_count']}/{$row['order_item_total']}";
$t = array();
$info = array();
$info[] = 'No: <a href="?open=order&id=' . $row['orders_id'] . '" target="_blank" title="View Order Detail">' . $row['orders_no'] . '</a> <span class="notice">(' . $item_count . ')</span>';
$info[] = 'Date: ' . date('d-M-y', $order_date);
$info[] = 'Cust: <a href="?open=customer&id=' . $row['customers_id'] . '" target="_blank" title="View Customer Detail" >' . $row['customers_name'] . '</a> <span class="notice">(' . $row['customers_order_count'] . ')</span>';
$info[] = 'Product: <a href="?open=product-detail&products_id=' . $row['products_id'] . '" target="_blank" title="View product detail">' . $row['products_model'] . '</a>';
$info[] = 'Qty: ' . $row['products_quantity'];
$info[] = 'Price: ' . $row['final_price'];
示例2: orders
<?php
use_class('orders');
use_class('payone');
$class_o = new orders();
$default_comment = 'Comment...';
//AJAX ACTION
if (isset($_POST['me_action']) && $_POST['me_action'] != '') {
if ($_POST['me_action'] == 'SEARCHORDERS') {
$search_field = tep_db_prepare_input($_POST['search_field']);
$search_keywords = tep_db_prepare_input(utf8_decode($_POST['search_keywords']));
$orders = $class_o->searchOrders($search_field, $search_keywords, "op.status IN (9,11)");
$result = '';
$table = array();
if (count($orders) > 0) {
$t = array();
$t['c'] = 'Order Info';
$t['a'] = 'Product Code';
$t['r'] = 'Return Info';
$t['t'] = 'Action';
$table[] = $t;
foreach ($orders as $row) {
$existing_return = $class_o->productReturnTotalQty($row['orders_products_id']);
if ($existing_return < $row['products_quantity']) {
$order_date = strtotime($row['date_purchased']);
$item_count = "{$row['order_item_count']}/{$row['order_item_total']}";
$t = array();
$info = array();
$info[] = 'No: <a href="?open=order&id=' . $row['orders_id'] . '" target="_blank" title="View Order Detail">' . $row['orders_no'] . '</a>';
$info[] = 'Date: ' . date('d-M-y', $order_date);
$info[] = 'Cust: <a href="?open=customer&id=' . $row['customers_id'] . '" target="_blank" title="View Customer Detail" >' . $row['customers_name'] . '</a> <span class="notice">(' . $row['customers_order_count'] . ')</span>';