當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OrderDetail::instance方法代碼示例

本文整理匯總了PHP中OrderDetail::instance方法的典型用法代碼示例。如果您正苦於以下問題:PHP OrderDetail::instance方法的具體用法?PHP OrderDetail::instance怎麽用?PHP OrderDetail::instance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OrderDetail的用法示例。


在下文中一共展示了OrderDetail::instance方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     if ($this->is_ajax_request() == TRUE) {
         $this->template = new View('layout/default_json');
     }
     role::check('orders');
     $this->order_basic_obj = OrderBasic::instance();
     $this->order_detail_obj = OrderDetail::instance();
 }
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:10,代碼來源:order.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->obj_user_help = userfunc::get_instance();
     $this->obj_order = order::get_instance();
     $this->obj_orderbasic = OrderBasic::instance();
     $this->obj_orderdetail = OrderDetail::instance();
     if ($this->obj_user_help->is_login() == FALSE) {
         //header('Location: http://'.$this->_site_config['site_config']['name'].'/user/login');
     }
 }
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:11,代碼來源:service.php

示例3: orderlist

 public function orderlist()
 {
     if ($this->obj_user_help->is_login() == FALSE) {
         header('Location: http://' . $this->_site_config['site_config']['name'] . '/user/login');
     }
     $obj_orderbasic = OrderBasic::instance();
     $obj_orderdetail = OrderDetail::instance();
     $get_page = $this->input->get('page');
     $page = $get_page != FALSE ? intval($get_page) : "1";
     //當前頁碼
     $config['base_url'] = "/user/orderlist/";
     $config['total_items'] = $obj_orderbasic->get_user_order_count($this->_user['id']);
     //總數量
     $config['query_string'] = 'page';
     $config['items_per_page'] = 10;
     //每頁的數量
     $config['uri_segment'] = $page;
     $config['directory'] = "";
     //樣式路徑
     $query_struct = array('where' => array('uid' => $this->_user['id']), 'orderby' => array('id' => 'desc'), 'limit' => array('per_page' => $config['items_per_page'], 'offset' => $page));
     $this->pagination = new Pagination($config);
     $this->pagination->initialize();
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $data = $obj_orderbasic->lists($query_struct);
     for ($i = 0; $i < count($data); $i++) {
         $order_id = $data[$i]['id'];
         $detail = $obj_orderdetail->get_orders_by_orderid($order_id);
         $data[$i]['child_orders'] = $detail;
     }
     $view = new View('user/order_list');
     $view->set("data", $data);
     $view->render(TRUE);
 }
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:33,代碼來源:user.php


注:本文中的OrderDetail::instance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。