当前位置: 首页>>代码示例>>PHP>>正文


PHP Customers::GetOrders方法代码示例

本文整理汇总了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'));
}
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:cp_cab_customer.php

示例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']);
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:cp_cab_orders_customer.php


注:本文中的Customers::GetOrders方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。