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


PHP Orders::SetFieldsById方法代码示例

本文整理汇总了PHP中Orders::SetFieldsById方法的典型用法代码示例。如果您正苦于以下问题:PHP Orders::SetFieldsById方法的具体用法?PHP Orders::SetFieldsById怎么用?PHP Orders::SetFieldsById使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Orders的用法示例。


在下文中一共展示了Orders::SetFieldsById方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?php

$GLOBALS['IERA_LINKS'] = array();
$GLOBALS['IERA_LINKS'][1]['title'] = "История заказов";
if (isset($_POST['id_order']) && !empty($_POST['id_order'])) {
    $id_order = intval($_POST['id_order']);
}
$Customer = new Customers();
$Customer->SetFieldsById($User->fields['id_user']);
$Order = new Orders();
if (isset($id_order)) {
    $Order->SetFieldsById($id_order);
}
if (isset($_POST['smb_off'])) {
    if ($Order->OffUserOrder($id_order)) {
        $tpl->Assign('msg', 'Заказ отменен контрагентом.');
        unset($_POST);
    } else {
        $tpl->Assign('msg', 'Информация не обновлена.');
    }
}
$fields = array('creation_date', 'target_date', 'id_order', 'status', 'pretense', 'pretense_status', 'return', 'return_status');
$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');
$orderby = "o.id_order desc";
$sort_links = array();
$GET_limit = "";
if (isset($_GET['limit'])) {
    $GET_limit = "limit" . $_GET['limit'] . '/';
}
$tpl->Assign('sort_links', $sort_links);
$orders = $Customer->GetPromoOrders();
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:cp_cab_promo_customer.php

示例2: array

<?php

$orders = $_POST['orders'];
unset($parsed_res);
require $GLOBALS['PATH_model'] . 'invoice_c.php';
$orders_data = array();
//Тут будем хранить данные о каждом заказе
foreach ($orders as $order_id) {
    $Order = new Orders();
    $Order->SetFieldsById($order_id);
    $orders_data[$order_id] = $Order->fields;
    $User = new Users();
    //Получаем клиента
    $id_customer = $orders_data[$order_id]['id_customer'];
    $Customer = new Customers();
    $Customer->SetFieldsById($id_customer);
    //Получаем контрагента
    $id_contragent = $orders_data[$order_id]['id_contragent'];
    $Contragent = new Contragents();
    $Contragent->SetFieldsById($id_contragent);
    //Получаем поля и присоединяем к данным о заказе
    $customer_data = $Customer->fields;
    $contragent_data = $Contragent->fields;
    $orders_data[$order_id]['customer_data'] = $customer_data;
    $orders_data[$order_id]['contragent_data'] = $contragent_data;
    //Форматируем дату
    $orders_data[$order_id]['date'] = date("d.m.Y", $orders_data[$order_id]['target_date']);
    $Citys = new Citys();
    $city = $Citys->SetFieldsById($orders_data[$order_id]['id_city']);
    // Варианты доставки
    if ($orders_data[$order_id]['id_delivery'] == 1) {
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:composed_invoice.php

示例3: Customers

if ($infoJO && $infoProductsCartUsers) {
    if (isset($infoJO) && is_array($infoJO)) {
        $tpl->Assign('list', $infoJO['products']);
        $prod_list[$infoJO['id_cart']] = $tpl->Parse($GLOBALS['PATH_tpl_global'] . 'order_products_list.tpl');
    }
    $tpl->Assign('infoJO', $infoJO);
    $tpl->Assign('users_list', $infoProductsCartUsers);
}
if (isset($prod_list)) {
    $tpl->Assign('prod_list', $prod_list);
}
$Customer = new Customers();
$Customer->SetFieldsById($Users->fields['id_user']);
$Order = new Orders();
if (isset($id_order)) {
    $Order->SetFieldsById($id_order);
}
if (isset($_POST['smb_cancel'])) {
    if ($Order->CancelCustomerOrder($id_order)) {
        $tpl->Assign('msg', 'Заказ отменен.');
        unset($_POST);
    } else {
        $tpl->Assign('msg', 'Информация не обновлена.');
    }
}
if (isset($_POST['smb_off'])) {
    if ($Order->OffUserOrder($id_order)) {
        $tpl->Assign('msg', 'Заказ отменен контрагентом.');
        unset($_POST);
    } else {
        $tpl->Assign('msg', 'Информация не обновлена.');
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:cp_cab_cooperative_customer.php

示例4: FillByOrderId

 public function FillByOrderId($id_order, $add = null)
 {
     $Order = new Orders();
     $Customer = new Customers();
     $Order->SetFieldsById($id_order);
     $order = $Order->fields;
     if ($_SESSION['member']['gid'] == _ACL_CONTRAGENT_) {
         if ($order['discount'] > 0 && $_SESSION['member']['id_user'] == $order['id_customer']) {
             $this->SetPersonalDiscount($order['discount']);
             $Customer->UpdateCustomer(array('id_user' => $_SESSION['member']['id_user'], 'email' => $_SESSION['member']['email'], 'discount' => $order['discount']));
         }
     }
     $products = $Order->GetOrderForCart(array('o.id_order' => $id_order));
     if ($add == null && isset($_SESSION['cart']['id'])) {
         $this->ClearCart($_SESSION['cart']['id']);
     } elseif ($_SESSION['member']['gid'] == _ACL_CONTRAGENT_ && $add == null && !isset($_SESSION['cart']['id'])) {
         $_SESSION['cart'] = null;
     }
     $_SESSION['cart']['note'] = $order['note'];
     if ($_SESSION['member']['gid'] == _ACL_CONTRAGENT_) {
         $_SESSION['cart']['base_order'] = $id_order;
         $_SESSION['cart']['id_customer'] = $order['id_customer'];
         $Customer->SetSessionCustomerBonusCart($order['id_customer']);
     }
     foreach ($products as $p) {
         $p['quantity'] = $p['opt_qty'] + $p['mopt_qty'];
         if ($this->IsAvailableProduct($p['id_product'])) {
             $this->UpdateCartQty($p);
             // $this->IsActualPrice($p);
         } else {
             $_SESSION['cart']['unavailable_products'][] = $p;
         }
     }
     // print_r($_SESSION['cart']);
     // die();
 }
开发者ID:Arikito,项目名称:webking.xt,代码行数:36,代码来源:cart_c.php

示例5: isset

    $settings['margin'] = 1;
}
$settings['order'] = $_POST['order'];
if (isset($_POST['fact'])) {
    $settings['fact'] = $_POST['fact'];
}
if (isset($_POST['stamp'])) {
    $settings['stamp'] = $_POST['stamp'];
}
if (isset($_POST['NDS'])) {
    $settings['NDS'] = $_POST['NDS'];
}
$settings['pay_form'] = isset($_POST['pay_form']) ? $_POST['pay_form'] : null;
// Получание информации о заказе
$Order = new Orders();
$Order->SetFieldsById($settings['order']);
$order_details = $Order->fields;
$Customers = new Customers();
$Address = new Address();
$address = $Address->GetAddressById($order_details['id_address']);
$tpl->Assign('address', $address);
if ($_POST['personal_client']) {
    $order_details['cont_person'] = $_POST['personal_client'];
} else {
    $Customers->SetFieldsById($_POST['client']);
    $cstmr = $Customers->fields;
    if ($cstmr) {
        $tpl->Assign('cstmr', $cstmr);
        $Citys = new Citys();
        $Citys->SetFieldsById($cstmr['id_city']);
        $order_details['address'] = $Citys->fields;
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:tcpdf.php

示例6: SendOrderRetInvoicesToContragent

 public function SendOrderRetInvoicesToContragent($id_order)
 {
     global $db;
     $Order = new Orders();
     $Order->SetFieldsById($id_order);
     // Устанавливаем тему письма
     $this->Subject = "Возврат на накладные покупателя и контрагента по заказу № " . $id_order;
     // Задаем тело письма
     $this->Body = "Возврат на заказ № " . $id_order . "<br>" . "Возврат по накладной покупателя - <a href=\"http://" . $_SERVER['SERVER_NAME'] . "/invoice_customer_ret/" . $id_order . "/" . $Order->fields['skey'] . "\">" . $_SERVER['SERVER_NAME'] . "/invoice_customer_ret/" . $id_order . "/" . $Order->fields['skey'] . "</a><br>";
     $sql = "SELECT email, name FROM " . _DB_PREFIX_ . "user u, " . _DB_PREFIX_ . "order o WHERE u.id_user=o.id_contragent AND o.id_order=" . mysql_real_escape_string($id_order);
     $arr = $db->GetOneRowArray($sql);
     // Добавляем адрес в список получателей
     $this->isHTML(true);
     $this->AddAddress($arr['email'], $arr['name']);
     if (!$this->Send()) {
         $this->ClearAddresses();
         $this->ClearAttachments();
         if ($this->echo) {
             echo $arr['email'] . " - Не могу отослать письмо! \n<br>";
         }
         return false;
     } else {
         $this->ClearAddresses();
         $this->ClearAttachments();
         if ($this->echo) {
             echo $arr['email'] . " - Письмо отослано! \n<br>";
         }
         return true;
     }
 }
开发者ID:Arikito,项目名称:webking.xt,代码行数:30,代码来源:mailer_c.php


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