Display the currently outstanding orders for the current user

@return HTMLText
499515
public function index()
    {
        // Setup default profile summary sections
        $sections = ArrayList::create();

        $sections->push(
            ArrayData::create(
                array(
                "Title" => "",
                "Content" => $this->renderWith(
                    "UsersProfileSummary",
                    array("CurrentUser" => Member::currentUser())
                )
                )
            )
        );

        // Allow users to add extra content sections to the
        // summary
        $this->extend("updateIndexSections", $sections);

        $this->customise(
            array(
            "Title" => _t('Users.ProfileSummary', 'Profile Summary'),
            "MetaTitle" => _t('Users.ProfileSummary', 'Profile Summary'),
            "Content" => $this->renderWith(
                "UsersAccountSections",
                array("Sections" => $sections)
            )
            )
        );

        $this->extend("onBeforeIndex");

        return $this->renderWith(
            array(
            "UserAccount",
            "Page"
            )
        );
    }
131947
public function getDescription()
    {
        $description = Yii::t('podium/view', 'No New Posts');
        $append = false;

        if ($this->locked) {
            $description = Yii::t('podium/view', 'Locked Thread');
            $append = true;
        } elseif ($this->pinned) {
            $description = Yii::t('podium/view', 'Pinned Thread');
            $append = true;
        } elseif ($this->posts >= Podium::getInstance()->podiumConfig->get('hot_minimum')) {
            $description = Yii::t('podium/view', 'Hot Thread');
            $append = true;
        }
        if ($this->userView) {
            if ($this->new_post_at > $this->userView->new_last_seen) {
                if (!$append) {
                    $description = Yii::t('podium/view', 'New Posts');
                } else {
                    $description .= ' (' . Yii::t('podium/view', 'New Posts') . ')';
                }
            } elseif ($this->edited_post_at > $this->userView->edited_last_seen) {
                if (!$append) {
                    $description = Yii::t('podium/view', 'Edited Posts');
                } else {
                    $description = ' (' . Yii::t('podium/view', 'Edited Posts') . ')';
                }
            }
        } else {
            if (!$append) {
                $description = Yii::t('podium/view', 'New Posts');
            } else {
                $description .= ' (' . Yii::t('podium/view', 'New Posts') . ')';
            }
        }
        return $description;
    }
361654
public function index()
    {
        error_reporting(0);
        header('Content-type: text/plain');
        set_time_limit(100);

        //get inputs
        $sessionId = $_REQUEST["sessionId"];
        $serviceCode = $_REQUEST["serviceCode"];
        $phoneNumber = $_REQUEST["phoneNumber"];
        $text = $_REQUEST["text"];   //


        $data = ['phone' => $phoneNumber, 'text' => $text, 'service_code' => $serviceCode, 'session_id' => $sessionId];
//        print_r($data);
//        exit;
        //log USSD request
        ussd_logs::create($data);

        //verify that the user exists
        $no = substr($phoneNumber, -9);

        $user = ussd_user::where('phone', "0" . $no)->orWhere('phone', "254" . $no)->first();

        if (!$user) {
            //if user phone doesn't exist, we check out if they have been registered to mifos
            $usr = array();
            $usr['phone'] = "0".$no;
            $usr['session'] = 0;
            $usr['progress'] = 0;
            $usr['confirm_from'] = 0;
            $usr['menu_item_id'] = 0;

            $user = ussd_user::create($usr);
        }

        if (self::user_is_starting($text)) {
            //lets get the home menu
            //reset user
            self::resetUser($user);
            //user authentication
            $message = '';

                $response = self::getMenuAndItems($user,1);
        
            //get the home menu
            self::sendResponse($response, 1, $user);
        } else {

            //message is the latest stuff
            $result = explode("*", $text);
            if (empty($result)) {
                $message = $text;
            } else {
                end($result);
                // move the internal pointer to the end of the array
                $message = current($result);
            }

            switch ($user->session) {

                case 0 :
                    //neutral user
                    break;
                case 1 :
                    $response = self::continueUssdMenuProcess($user, $message);
                    //echo "Main Menu";
                    break;
                case 2 :
                    //confirm USSD Process
                    $response = self::confirmUssdProcess($user, $message);
                    break;
                case 3 :
                    //Go back menu
                    $response = self::confirmGoBack($user, $message);
                    break;
                case 4 :
                    //Go back menu
                    $response = self::confirmGoBack($user, $message);
                    break;
                default:
                    break;
            }

            self::sendResponse($response, 1, $user);
        }

    }
581119
public function index()
    {
        $menusList = Menu::with(['children'])
            ->where('menu_type', '!=', 0)
            ->where('parent_id', null)
            ->orderBy('position')->get();

        return view('qa::menus.index', compact('menusList'));
    }
543264
public function index() {
		$data['button_confirm'] = $this->language->get('button_confirm');

		$this->load->model('checkout/order');

		$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);

		$data['action'] = 'https://www.2checkout.com/checkout/purchase';

		$data['sid'] = $this->config->get('payment_twocheckout_account');
		//$data['currency_code'] = $order_info['currency_code'];
		$data['currency_code'] = 'USD';
		//$data['total'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
		$data['total'] = $this->currency->format($order_info['total'], 'USD', $this->currency->getValue('USD'), false);
		$data['merchant_order_id'] = $this->session->data['order_id'];
		$data['card_holder_name'] = $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'];
		$data['street_address'] = $order_info['payment_address_1'];
		$data['city'] = $order_info['payment_city'];

		if ($order_info['payment_iso_code_2'] == 'US' || $order_info['payment_iso_code_2'] == 'CA') {
			$data['state'] = $order_info['payment_zone'];
		} else {
			$data['state'] = 'XX';
		}

		$data['zip'] = $order_info['payment_postcode'];
		$data['country'] = $order_info['payment_country'];
		$data['email'] = $order_info['email'];
		$data['phone'] = $order_info['telephone'];

		$data['shipping'] = (int)$this->cart->hasShipping();

		if ($data['shipping']) {
			$data['ship_street_address'] = $order_info['shipping_address_1'];
			$data['ship_city'] = $order_info['shipping_city'];
			$data['ship_state'] = $order_info['shipping_zone'];
			$data['ship_zip'] = $order_info['shipping_postcode'];
			$data['ship_country'] = $order_info['shipping_country'];
		} else {
			$data['ship_street_address'] = $order_info['payment_address_1'];
			$data['ship_city'] = $order_info['payment_city'];
			$data['ship_state'] = $order_info['payment_zone'];
			$data['ship_zip'] = $order_info['payment_postcode'];
			$data['ship_country'] = $order_info['payment_country'];
		}

		$data['products'] = array();

		$products = $this->cart->getProducts();

		foreach ($products as $product) {
			$data['products'][] = array(
				'product_id'  => $product['product_id'],
				'name'        => $product['name'],
				'description' => $product['name'],
				'quantity'    => $product['quantity'],
				'price'       => $this->currency->format($product['price'], $order_info['currency_code'], $order_info['currency_value'], false),
				'shipping'    => !empty($product['shipping']) ? 'Y' : 'N'
			);
		}

		if ($this->config->get('payment_twocheckout_test')) {
			$data['demo'] = 'Y';
		} else {
			$data['demo'] = '';
		}

		if ($this->config->get('payment_twocheckout_display')) {
			$data['display'] = 'Y';
		} else {
			$data['display'] = '';
		}

		$data['lang'] = $this->session->data['language'];

		$data['return_url'] = $this->url->link('extension/payment/twocheckout/callback');

		return $this->load->view('extension/payment/twocheckout', $data);
	}
1268099
public static function RenderOrderSuccessHTMLCode()
    {
        $sHTML = '';
        $oUserOrder = &TShopBasket::GetLastCreatedOrder();
        $oProgram = TdbPkgShopAffiliate::GetActiveInstance();
        if ($oUserOrder && $oProgram) {
            $sHTML = $oProgram->RenderHTMLCode($oUserOrder);
        }

        return $sHTML;
    }
154154
public function index()
    {
        // Look for overriden views
        $this->overrideViews();

        // Get models to show
        $results = $this->makeIndexQuery()->paginate($this->perPage());

        // Render the view using the `listing` builder
        $listing = Listing::createFromController($this, $results);
        if ($this->parent) {
            $listing->parent($this->parent);

            // The layout header may have a many to many autocomplete
            $this->layout->with($this->autocompleteViewVars());
        }

        // Render view
        return $this->populateView($listing);
    }
1129612
private function _formatOrder()
    {
        $orders = array();

        if (isset($this->_order[DbInterface::ORDER_RAND])) {
            $orders[] = 'RAND()';
        } else {
            foreach ($this->_order as $field => $order) {
                $orders[] = "`$field` $order";
            }
        }

        return ' ORDER BY ' . implode(', ', $orders);
    }
1265575
public function index()
    {
        $options = $this->getParams('offset', 'limit', 'includes', 'order_by');

        $orders = Subbly::api('subbly.order')->all($options);

        return $this->jsonCollectionResponse('orders', $orders);
    }
504483
def show_order(self, order_id):
        """"""
        request = self._get('transactions/orders/' + str(order_id))
        return self.responder(request)
1323750
public function index()
    {
        $dataGrid = new UserDataGrid($this->repository->query());

        return view('avored-framework::user.user.index')
            ->withDataGrid($dataGrid->dataGrid);
    }
1190055
public function index()
    {
        $orderReturnGrid = new OrderReturnRequestDataGrid($this->repository->all());

        return view('avored-framework::order.return-request.index')
                    ->withDataGrid($orderReturnGrid->dataGrid);
    }
344730
public function getSold()
    {
        $items = Auth::user()->items()
            ->leftJoin('purchases')
            ->where(function ($query) {
                $query->typeFixed()->whereNotNull('purchases.purchase_id');
            });

        // Allows sorting by buyer username
        $items->getBaseQuery()
            ->join('users', 'users.user_id', '=', 'purchases.user_id');

        if (mustard_loaded('auctions')) {
            $items->leftJoin('winningBid')
                ->orWhere(function ($query) {
                    $query->typeAuction()->whereNotNull('bids.bid_id');
                });
        }

        $table = new InventorySold($items);

        return view('mustard::inventory.sold', [
            'table' => $table,
            'items' => $table->paginate(),
        ]);
    }
106198
public function view()
    {
        if (!userHasPermission('admin:invoice:payment:view')) {
            unauthorised();
        }

        // --------------------------------------------------------------------------

        $oUri          = Factory::service('Uri');
        $oPaymentModel = Factory::model('Payment', 'nails/module-invoice');

        // --------------------------------------------------------------------------

        $this->data['payment'] = $oPaymentModel->getById(
            $oUri->segment(5),
            ['expand' => $oPaymentModel::EXPAND_ALL]
        );

        if (!$this->data['payment']) {
            show404();
        }

        $this->data['page']->title = 'View Payment &rsaquo; ' . $this->data['payment']->ref;

        Helper::loadView('view');
    }
224367
protected function getTotalLogOrder()
    {
        $conditions = array(
            'count' => true,
            'order_id' => $this->data_order['order_id']
        );

        return (int) $this->order_history->getList($conditions);
    }
197569
public function getOrdered()
    {
        if (!$this->sort) {
            return $this->content;
        }

        $unordered = [];
        foreach ($this->content as $content) {
            $unordered[$content->getId()] = $content;
        }

        $ordered = [];
        $sort = json_decode($this->sort, true);
        $order = $sort['order'];
        foreach ($order as $id) {
            if (isset($unordered[$id])) {
                $ordered[] = $unordered[$id];
            }
        }

        return $ordered;
    }
275119
protected function renderListTemplate($currentOrder)
    {
        return $this->render(
            "states",
            array(
                'page' => $this->getRequest()->get('page', 1),
                "page_limit" => $this->getRequest()->get('page_limit', 50),
                'page_order' => $this->getRequest()->get('page_order', 1)
            )
        );
    }