コード例 #1
0
ファイル: report_itemised.php プロジェクト: ForAEdesWeb/AEW4
 /**
  * Validates the data submitted based on the suffix provided
  * A controller for this plugin, you could say
  *
  * @param $task
  * @return html
  */
 function viewList()
 {
     $app = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = $option . '.report';
     $html = "";
     JToolBarHelper::title(JText::_('J2STORE_REPORT') . '-' . JText::_('PLG_J2STORE_' . strtoupper($this->_element)), 'j2store-logo');
     J2StoreToolBar::_custom('export', 'new', 'new', 'PLG_J2STORE_EXPORT_ITEMISED', false, false, 'reportTask');
     $vars = new JObject();
     $this->includeCustomModel('Reportitemised');
     $this->includeCustomTables();
     $model = JModelLegacy::getInstance('Reportitemised', 'J2StoreModel');
     $model->setState('filter_search', $app->input->getString('filter_search'));
     $model->setState('filter_orderstatus', $app->input->getString('filter_orderstatus'));
     $model->setState('filter_order', $app->input->getString('filter_order'));
     $model->setState('filter_order_Dir', $app->input->getString('filter_order_Dir'));
     $list = $model->getData();
     $vars->state = $model->getState();
     $vars->list = $list;
     $vars->total = $model->getTotal();
     $vars->pagination = $model->getPagination();
     $vars->orderStatus = $this->getOrderStatus();
     $id = $app->input->getInt('id', '0');
     $vars->id = $id;
     $form = array();
     $form['action'] = "index.php?option=com_j2store&view=report&task=view&id={$id}";
     $vars->form = $form;
     $html = $this->_getLayout('default', $vars);
     return $html;
 }
コード例 #2
0
 /**
  * Validates the data submitted based on the suffix provided
  * A controller for this plugin, you could say
  *
  * @param $task
  * @return html
  */
 function viewList()
 {
     $app = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = $option . '.report';
     $html = "";
     JToolBarHelper::title(JText::_('J2STORE_REPORT') . '-' . JText::_('PLG_J2STORE_' . strtoupper($this->_element)), 'j2store-logo');
     JToolbarHelper::back('J2STORE_BACK_TO_REPORT', 'index.php?option=com_j2store&view=report');
     //JToolbarHelper::custom(JText::_('PLG_J2STORE_EXPORT_ORDERITEMS'), 'index.php?option=com_j2store&view=report&reportTask=export');
     J2StoreToolBar::_custom('export', 'new', 'new', 'J2STORE_EXPORT_ORDERS', false, false, 'reportTask');
     $vars = new JObject();
     $this->includeCustomModel('ReportOrderitems');
     $this->includeCustomTables();
     $model = JModelLegacy::getInstance('Reportorderitems', 'J2StoreModel');
     $model->setState('filter_search', $app->input->getString('filter_search'));
     $model->setState('filter_orderstatus', $app->input->getString('filter_orderstatus'));
     $model->setState('filter_order', $app->input->getString('filter_order'));
     $model->setState('filter_order_Dir', $app->input->getString('filter_order_Dir'));
     // Get the pagination request variables
     $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int');
     $limitstart = $app->getUserStateFromRequest($ns . '.limitstart', 'limitstart', 0, 'int');
     // In case limit has been changed, adjust limitstart accordingly
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $model->setState('limit', $limit);
     $model->setState('limitstart', $limitstart);
     $list = $model->getList();
     $vars->total = $model->getTotal();
     $vars->pagination = $model->getPagination();
     $vars->state = $model->getState();
     $vars->list = $list;
     $vars->params = JComponentHelper::getParams('com_j2store');
     $vars->orderStatus = $this->getOrderStatus();
     $id = $app->input->getInt('id', '0');
     $vars->id = $id;
     $form = array();
     $form['action'] = "index.php?option=com_j2store&view=report&task=view&id={$id}";
     $vars->form = $form;
     $html = $this->_getLayout('default', $vars);
     return $html;
 }
コード例 #3
0
 /**
  * Validates the data submitted based on the suffix provided
  * A controller for this plugin, you could say
  *
  * @param $task
  * @return html
  */
 function viewList()
 {
     $app = JFactory::getApplication();
     $html = "";
     JToolBarHelper::title(JText::_('J2STORE_SHIPM_SHIPPING_METHODS') . '-' . JText::_('plg_j2store_' . $this->_element), 'j2store-logo');
     J2StoreToolBar::_custom('newMethod', 'new', 'new', 'JTOOLBAR_NEW', false, false, 'shippingTask');
     J2StoreToolBar::_custom('delete', 'delete', 'delete', 'JTOOLBAR_DELETE', false, false, 'shippingTask');
     //JToolBarHelper::trash('delete', 'JTOOLBAR_DELETE');
     JToolBarHelper::cancel('cancel', 'JTOOLBAR_CLOSE');
     $vars = new JObject();
     $vars->state = $this->_getState();
     $this->includeCustomModel('ShippingMethods');
     $this->includeCustomTables();
     $model = JModelLegacy::getInstance('ShippingMethods', 'J2StoreModel');
     $list = $model->getList();
     $vars->list = $list;
     $id = $app->input->getInt('id', '0');
     $form = array();
     $form['action'] = "index.php?option=com_j2store&view=shipping&task=view&id={$id}";
     $vars->form = $form;
     $vars->sid = $id;
     $html = $this->_getLayout('default', $vars);
     return $html;
 }
コード例 #4
0
ファイル: controller.php プロジェクト: ForAEdesWeb/AEW4
 function view()
 {
     $app = JFactory::getApplication();
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/library/select.php';
     J2StoreToolBar::_custom('save', 'save', 'save', 'JTOOLBAR_SAVE', false, 'shippingTask');
     J2StoreToolBar::_custom('cancel', 'cancel', 'cancel', 'JTOOLBAR_CLOSE', false, 'shippingTask');
     JToolBarHelper::title(JText::_('J2STORE_SHIPM_SHIPPING_METHODS'), 'j2store-logo');
     $id = $app->input->getInt('id', '0');
     $sid = $app->input->getInt('sid', '0');
     $this->includeCustomModel('ShippingMethods');
     $this->includeCustomTables();
     $model = JModelLegacy::getInstance('ShippingMethods', 'J2StoreModel');
     $model->setId((int) $sid);
     $item = $model->getItem();
     if (!isset($item)) {
         $item = JTable::getInstance('ShippingMethods', 'Table');
     }
     $data = array();
     $data['published'] = JHTML::_('select.booleanlist', 'published', 'class=""', $item->published);
     $data['taxclass'] = J2StoreSelect::taxclass($item->tax_class_id, 'tax_class_id');
     $data['shippingtype'] = J2StoreSelect::shippingtype($item->shipping_method_type, 'shipping_method_type', '', 'shipping_method_type', false);
     $options = array();
     $options[] = JHtml::_('select.option', 'no', JText::_('JNO'));
     $options[] = JHtml::_('select.option', 'store', JText::_('J2STORE_SHIPPING_STORE_ADDRESS'));
     $data['address_override'] = JHtmlSelect::genericlist($options, 'address_override', array(), 'value', 'text', $item->address_override);
     // Form
     $form = array();
     $form['action'] = $this->baseLink();
     $form['shippingTask'] = 'save';
     //We are calling a view from the ShippingMethods we isn't actually the same  controller this has, however since all it does is extend the base view it is
     // all good, and we don't need to remake getView()
     $view = $this->getView('ShippingMethods', 'html');
     $view->hidemenu = true;
     $view->hidestats = true;
     //$view->setTask(true);
     $view->setModel($model, true);
     $view->assign('item', $item);
     $view->assign('data', $data);
     $view->assign('form2', $form);
     $view->setLayout('view');
     $view->display();
 }