本文整理汇总了PHP中Orders::GetOrderForCustomer方法的典型用法代码示例。如果您正苦于以下问题:PHP Orders::GetOrderForCustomer方法的具体用法?PHP Orders::GetOrderForCustomer怎么用?PHP Orders::GetOrderForCustomer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orders
的用法示例。
在下文中一共展示了Orders::GetOrderForCustomer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Contragents
// }
// }
// Список заказов
$orders = $Customer->GetOrders($orderby);
$order_statuses = $Order->GetStatuses();
//print_r($orders);
$Contragent = new Contragents();
foreach ($orders as &$order) {
$Order->SetFieldsById($order['id_order']);
$Contragent->SetFieldsById($Order->fields['id_contragent']);
$order['contragent_info'] = $Contragent->fields;
}
$Citys = new Citys();
foreach ($orders as &$order) {
$Order->SetFieldsById($order['id_order']);
$Citys->SetFieldsById($Order->fields['id_city']);
$order['city_info'] = $Citys->fields;
$order['products'] = $Order->GetOrderForCustomer(array("o.id_order" => $order['id_order']));
}
$tpl->Assign('orders', $orders);
/*$arr = array();
foreach($orders as &$order_2){
$arr = $Order->GetOrderForCustomer(array("o.id_order" => $order_2['id_order']));
}*/
//$tpl->Assign('products', $arr);
$Users->SetUser($_SESSION['member']);
$tpl->Assign('User', $Users->fields);
$tpl->Assign('Customer', $Customer->fields);
$tpl->Assign('order_statuses', $order_statuses);
$parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_customer_cab_cooperative.tpl'));
//
示例2: unset
if (isset($_POST['smb_cancel'])) {
if ($Order->CancelCustomerOrder($id_order)) {
$tpl->Assign('msg_type', 'success');
$tpl->Assign('msg', 'Заказ отменен.');
unset($_POST);
header('Location: ' . $_SERVER['REQUEST_URI']);
} else {
$tpl->Assign('msg_type', 'error');
$tpl->Assign('msg', 'Информация не обновлена.');
}
}
$Customer = new Customers();
$Customer->SetFieldsById($User->fields['id_user']);
$tpl->Assign('Customer', $Customer->fields);
if ($User->fields['gid'] == _ACL_CONTRAGENT_) {
$arr = $Order->GetOrderForCustomer(array("o.id_order" => $id_order));
} else {
$arr = $Order->GetOrderForCustomer(array("o.id_customer" => $User->fields['id_user'], "o.id_order" => $id_order));
}
if ($arr) {
$Products = new Products();
foreach ($arr as &$p) {
$p['images'] = $Products->GetPhotoById($p['id_product']);
}
}
$tpl->Assign('data', $arr);
if ($arr[0]['id_pretense_status'] != 0) {
$pretarr = $Order->GetPretenseAdditionalRows($id_order);
$tpl->Assign("pretarr", $pretarr);
}
$active_pretense_btn = false;
示例3: Users
<?php
if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
$Users = new Users();
$Cart = new Cart();
$Orders = new Orders();
if (isset($_POST['action'])) {
switch ($_POST['action']) {
case 'GetProdList':
$Order = new Orders();
$Products = new Products();
$list = $Order->GetOrderForCustomer(array("o.id_order" => $_POST['id_order']));
foreach ($list as &$p) {
$p['images'] = $Products->GetPhotoById($p['id_product']);
}
$tpl->Assign('list', $list);
$tpl->Assign('rewrite', $_POST['rewrite']);
// echo $tpl->Parse($GLOBALS['PATH_tpl'].'cp_customer_cab_orders_prod_list.tpl');
$tpl->Assign('prod_list', $tpl->Parse($GLOBALS['PATH_tpl_global'] . 'order_products_list.tpl'));
echo $tpl->Parse($GLOBALS['PATH_tpl_global'] . 'order_products_list.tpl');
break;
case 'GetProdListForCart':
$Cart = new Cart();
$list = $Cart->GetProductsForCart($_POST['id_cart']);
$tpl->Assign('list', $list);
// echo $tpl->Parse($GLOBALS['PATH_tpl'].'cp_customer_cab_orders_prod_list.tpl');
$tpl->Assign('prod_list', $tpl->Parse($GLOBALS['PATH_tpl_global'] . 'order_products_list.tpl'));
echo $tpl->Parse($GLOBALS['PATH_tpl_global'] . 'order_products_list.tpl');
break;
case 'GetProdListForJO':
$Cart = new Cart();