本文整理汇总了PHP中Customers::GetOrders方法的典型用法代码示例。如果您正苦于以下问题:PHP Customers::GetOrders方法的具体用法?PHP Customers::GetOrders怎么用?PHP Customers::GetOrders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customers
的用法示例。
在下文中一共展示了Customers::GetOrders方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$ii = count($GLOBALS['IERA_LINKS']) - 1;
foreach ($fields as $f) {
$sort_links[$f] = $GLOBALS['IERA_LINKS'][$ii]['url'] . "{$GET_limit}ord/{$f}/desc";
if (in_array("ord", $GLOBALS['REQAR']) && in_array($f, $GLOBALS['REQAR'])) {
if (in_array("asc", $GLOBALS['REQAR'])) {
$sort_links[$f] = $GLOBALS['IERA_LINKS'][$ii]['url'] . "{$GET_limit}ord/{$f}/desc";
$orderby = "{$f_assoc[$f]} asc";
} else {
$sort_links[$f] = $GLOBALS['IERA_LINKS'][$ii]['url'] . "{$GET_limit}ord/{$f}/asc";
$orderby = "{$f_assoc[$f]} desc";
}
}
}
$tpl->Assign('sort_links', $sort_links);
// Список заказов
$orders = $Customer->GetOrders($orderby);
$tpl->Assign('orders', $orders);
$order_statuses = $Order->GetStatuses();
$User->SetUser($_SESSION['member']);
$tpl->Assign('User', $User->fields);
$tpl->Assign('Customer', $Customer->fields);
$tpl->Assign('SavedCity', $SavedCity->fields);
$tpl->Assign('SavedContragent', $SavedContragent->fields);
$tpl->Assign('DeliveryMethod', $DeliveryMethod->list);
$tpl->Assign('SavedDeliveryMethod', $SavedDeliveryMethod->fields);
$tpl->Assign('order_statuses', $order_statuses);
if (isset($_SESSION['member']['promo_code']) && $_SESSION['member']['promo_code'] != '') {
$parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_customer_promo_cab.tpl'));
} else {
$parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_customer_cab.tpl'));
}
示例2: array
$f_assoc = array('creation_date' => 'o.creation_date', 'target_date' => 'o.target_date', 'id_order' => 'o.id_order', 'status' => 'o.id_order_status', 'pretense' => 'o.id_pretense_status', 'pretense_status' => 'o.id_pretense_status', 'return' => 'o.id_return_status', 'return_status' => 'o.id_return_status');
$GET_limit = "";
if (isset($_GET['limit'])) {
$GET_limit = "limit " . $_GET['limit'] . '/';
}
// if(isset($_GET['filter'])){
// $mc->set("filters", array($_GET['q']=>$_GET['filter']));
// }else{
// if(!isset($mc->get("filters")[$_GET['q']])){
// $mc->set("filters", array($_GET['q']=>'all'));
// }
// }
// Список заказов
$GLOBALS['Limit_db'] = 10;
// кол-во заказов на одной странице
$cnt = count($Customer->GetOrders(false, false, $status));
$GLOBALS['paginator_html'] = G::NeedfulPages($cnt);
// print_r(' '.$GLOBALS['Start'].', '.$GLOBALS['Limit_db']);
// die();
$limit = isset($GLOBALS['Start']) ? ' LIMIT ' . $GLOBALS['Start'] . ', ' . $GLOBALS['Limit_db'] : "";
// var_dump($limit);
$orders = $Customer->GetOrders($orderby, $limit, $status);
// die();
$order_statuses = $Order->GetStatuses();
$Contragent = new Contragents();
$Address = new Address();
foreach ($orders as &$order) {
$Order->SetFieldsById($order['id_order']);
$Contragent->SetFieldsById($Order->fields['id_contragent']);
$order['contragent_info'] = $Contragent->fields;
$order['address_info'] = $Address->getAddressOrder($order['id_order']);