function orders() { $jshopConfig = JSFactory::getConfig(); $dispatcher = JDispatcher::getInstance(); checkUserLogin(); $model = JSFactory::getModel('userOrders', 'jshop'); JshopHelpersMetadata::userOrders(); $model->setUserId(JFactory::getUser()->id); $orders = $model->getListOrders(); $total = $model->getTotal(); $dispatcher->trigger('onBeforeDisplayListOrder', array(&$orders, &$model)); $view = $this->getView('order'); $view->setLayout("listorder"); $view->assign('orders', $orders); $view->assign('image_path', $jshopConfig->live_path . "images"); $view->assign('total', $total); $dispatcher->trigger('onBeforeDisplayOrdersView', array(&$view)); $view->display(); }