コード例 #1
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('*');
     $query->from('#__j2store_storeprofiles');
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     if (count($rows) < 1) {
         $redirect_url = 'index.php?option=com_j2store&view=postconfig';
         $app->redirect($redirect_url);
     }
     $model = $this->getModel('cpanel');
     $model->checkCurrency();
     //fix indexes
     $model->fixIndexes();
     $params = JComponentHelper::getParams('com_j2store');
     $this->assignRef('params', $params);
     require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/orders.php';
     require_once JPATH_COMPONENT_ADMINISTRATOR . '/library/prices.php';
     $order_model = new J2StoreModelOrders();
     $order_model->setState('filter_limit', 5);
     $latest_items = $order_model->getOrders();
     $this->orders = $latest_items;
     $this->order_model = $order_model;
     $this->params = $params;
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
コード例 #3
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = $option . '.addresses';
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $filter_order = $mainframe->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'a.id', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $mainframe->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
     if (strpos($search, '"') !== false) {
         $search = str_replace(array('=', '<'), '', $search);
     }
     $search = JString::strtolower($search);
     // Get data from the model
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     $javascript = 'onchange="document.adminForm.submit();"';
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('pagination', $pagination);
     $model =& $this->getModel();
     $params = JComponentHelper::getParams('com_j2store');
     $this->addToolBar();
     J2StoreSubmenuHelper::addSubmenu($vName = 'addresses');
     parent::display($tpl);
 }
コード例 #4
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 /**
  * Method to display view
  * (non-PHPdoc)
  * @see JViewLegacy::display()
  */
 function display($tpl = null)
 {
     //get the app obj
     $app = JFactory::getApplication();
     //get the task
     $task = $app->input->get('task');
     //get the form
     $this->form = $this->get('Form');
     // Get data from the model
     $this->item = $this->get('Item');
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     $this->params = JComponentHelper::getParams('com_j2store');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //add toolbar
     $this->addToolBar($task);
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     // Display the template
     parent::display($tpl);
     // Set the document
     $this->setDocument();
 }
コード例 #5
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = 'com_j2store.fields';
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $params = JComponentHelper::getParams('com_j2store');
     $filter_order = $mainframe->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'a.field_id', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
     $filter_orderstate = $mainframe->getUserStateFromRequest($ns . 'filter_orderstate', 'filter_orderstate', '', 'string');
     $search = $mainframe->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
     if (strpos($search, '"') !== false) {
         $search = str_replace(array('=', '<'), '', $search);
     }
     $search = JString::strtolower($search);
     // Get data from the model
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('pagination', $pagination);
     $this->params = $params;
     $model = $this->getModel();
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
コード例 #6
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $params = JComponentHelper::getParams('com_j2store');
     $this->assignRef('params', $params);
     JHTML::_('behavior.formvalidation');
     parent::display($tpl);
 }
コード例 #7
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     //get the active menu details
     $menu = $app->getMenu()->getActive();
     //if any menu template choosen then that template will
     if (isset($menu->params)) {
         //first get the subtemplate from the menu
         $template = $menu->params->get('sub_template');
         if (empty($template)) {
             //now get it from the store profile
             $store = J2StoreHelperCart::getStoreAddress();
             $template = isset($store->store_default_template) ? $store->store_default_template : '';
         }
     }
     if (empty($template)) {
         $template = 'default';
     }
     //look for the in the views/products folder
     $this->_addPath('template', JPATH_SITE . '/components/com_j2store/templates');
     $this->_addPath('template', JPATH_SITE . '/components/com_j2store/templates/' . $template);
     // Look for overrides in J2Store template structure
     $this->_addPath('template', JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_j2store/templates/' . $template);
     $this->_addPath('template', JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_j2store/templates/default');
     //look for in the template overrides folder (Joomla structure)
     $this->_addPath('template', JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_j2store/products/default');
     $this->_addPath('template', JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_j2store/products/' . $template);
     parent::display($tpl);
 }
コード例 #8
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     //run the update if auto update is enabled
     require_once JPATH_SITE . '/components/com_j2store/helpers/cart.php';
     $storeprofile = J2StoreHelperCart::getStoreAddress();
     if ($storeprofile->config_currency_auto) {
         $model = $this->getModel('currencies');
         $model->updateCurrencies();
     }
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //add toolbar
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     // Display the template
     parent::display($tpl);
     $this->setDocument();
 }
コード例 #9
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $this->form = $this->get('Form');
     // Get data from the model
     $this->item = $this->get('Item');
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'models' . DS . 'taxrates.php';
     $model = new J2StoreModelTaxRates();
     $geozones = $model->getGeoZones();
     //generate geozone filter list
     $lists = array();
     $geozone_options = array();
     $geozone_options[] = JHTML::_('select.option', '', JText::_('J2STORE_SELECT_COUNTRY'));
     foreach ($geozones as $row) {
         $geozone_options[] = JHTML::_('select.option', $row->geozone_id, $row->geozone_name);
     }
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //add toolbar
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     // Display the template
     parent::display($tpl);
     // Set the document
     $this->setDocument();
 }
コード例 #10
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //get list of countries
     $this->countries = $this->get('Countries');
     //generate country filter list
     $lists = array();
     $country_options = array();
     $country_options[] = JHTML::_('select.option', '', JText::_('J2STORE_SELECT_COUNTRY'));
     foreach ($this->countries as $item) {
         $country_options[] = JHTML::_('select.option', $item->country_id, $item->country_name);
     }
     $lists['country_options'] = JHTML::_('select.genericlist', $country_options, 'filter_country_options', 'onchange="this.form.submit();"', 'value', 'text', $this->state->get('filter.country_options'));
     $this->assignRef('lists', $lists);
     //add toolbar
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     // Display the template
     parent::display($tpl);
     $this->setDocument();
 }
コード例 #11
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $this->form = $this->get('Form');
     // Get data from the model
     $this->item = $this->get('Item');
     $this->taxrules = $this->get('TaxRules');
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     $this->model = $this->getModel('taxprofile');
     $lists['taxrate'] = $this->get('TaxRateList');
     $lists['address'] = $this->get('AddressList');
     $this->lists = $lists;
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //add toolbar
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     // Display the template
     parent::display($tpl);
     // Set the document
     $this->setDocument();
 }
コード例 #12
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $view = $app->input->getWord('view', 'cpanel');
     $path = JPATH_ADMINISTRATOR . '/components/com_j2store/views/' . JString::strtolower($view) . '/tmpl';
     $this->addTemplatePath($path);
     parent::display($tpl);
 }
コード例 #13
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     JFormHelper::addFormPath(JPATH_ADMINISTRATOR . '/components/com_j2store/models/forms');
     JFormHelper::addFieldPath(JPATH_ADMINISTRATOR . '/components/com_j2store/models/fields');
     $this->form = JForm::getInstance('storeprofile', 'storeprofile');
     $this->addToolBar();
     parent::display();
 }
コード例 #14
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
    function display($tpl = null)
    {
        $mainframe = JFactory::getApplication();
        $option = 'com_j2store';
        $ns = 'com_j2store.options';
        $db = JFactory::getDBO();
        $uri = JFactory::getURI();
        $params = JComponentHelper::getParams('com_j2store');
        $filter_order = $mainframe->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'a.option_id', 'cmd');
        $filter_order_Dir = $mainframe->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
        $filter_orderstate = $mainframe->getUserStateFromRequest($ns . 'filter_orderstate', 'filter_orderstate', '', 'string');
        $search = $mainframe->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
        if (strpos($search, '"') !== false) {
            $search = str_replace(array('=', '<'), '', $search);
        }
        $search = JString::strtolower($search);
        // Get data from the model
        $items = $this->get('Data');
        $total = $this->get('Total');
        $pagination = $this->get('Pagination');
        $javascript = 'onchange="document.adminForm.submit();"';
        // table ordering
        $lists['order_Dir'] = $filter_order_Dir;
        $lists['order'] = $filter_order;
        // search filter
        $lists['search'] = $search;
        $this->assignRef('lists', $lists);
        $ordering = $this->lists['order'] == 'a.ordering';
        $this->assignRef('ordering', $ordering);
        // Joomla! 3.0 drag-n-drop sorting variables
        if (version_compare(JVERSION, '3.0', 'ge')) {
            JHtml::_('bootstrap.tooltip');
            if ($ordering) {
                JHtml::_('sortablelist.sortable', 'k2ItemsList', 'adminForm', strtolower($this->lists['order_Dir']), 'index.php?option=com_j2store&view=options&task=saveorder&format=raw');
            }
            $document = JFactory::getDocument();
            $document->addScriptDeclaration('
					Joomla.orderTable = function() {
					table = document.getElementById("sortTable");
					direction = document.getElementById("directionTable");
					order = table.options[table.selectedIndex].value;
					if (order != \'' . $this->lists['order'] . '\') {
					dirn = \'asc\';
		} else {
					dirn = direction.options[direction.selectedIndex].value;
		}
					Joomla.tableOrdering(order, dirn, "");
		}');
        }
        $this->assignRef('items', $items);
        $this->assignRef('pagination', $pagination);
        $model = $this->getModel();
        $this->addToolBar();
        $toolbar = new J2StoreToolBar();
        $toolbar->renderLinkbar();
        parent::display($tpl);
    }
コード例 #15
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_j2store' . DS . 'library' . DS . 'prices.php';
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = $option . '.orders';
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $task = $mainframe->input->getWord('task', '');
     $filter_order = $mainframe->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'a.id', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_orderstate = $mainframe->getUserStateFromRequest($ns . 'filter_orderstate', 'filter_orderstate', '', 'string');
     $search = $mainframe->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
     if (strpos($search, '"') !== false) {
         $search = str_replace(array('=', '<'), '', $search);
     }
     $search = JString::strtolower($search);
     // Get data from the model
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     $javascript = 'onchange="document.adminForm.submit();"';
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/models/orderstatuses.php';
     $os_model = new J2StoreModelOrderstatuses();
     $statuses = $os_model->getOrderStatuses();
     $filter_orderstate_options[] = JHTML::_('select.option', 0, JText::_('J2STORE_ORDER_SELECT_STATE'));
     foreach ($statuses as $status) {
         //order state filter
         $filter_orderstate_options[] = JHTML::_('select.option', $status->orderstatus_id, JText::_($status->orderstatus_name));
     }
     $lists['orderstate'] = JHTML::_('select.genericlist', $filter_orderstate_options, 'filter_orderstate', $javascript, 'value', 'text', $filter_orderstate);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('pagination', $pagination);
     //get the select list;
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/models/orderstatuses.php';
     $os_model = new J2StoreModelOrderstatuses();
     $statuses = $os_model->getOrderStatuses();
     $options = array();
     $options[] = JHTML::_('select.option', '', JText::_('J2STORE_ORDER_SELECT_STATE'));
     foreach ($statuses as $status) {
         $options[] = JHTML::_('select.option', $status->orderstatus_id, JText::_($status->orderstatus_name));
     }
     $this->assign('orderstate_options', $options);
     $this->params = $params = JComponentHelper::getParams('com_j2store');
     $this->addToolBar();
     if ($task != 'printOrder' && $task != 'viewtxnlog') {
         $toolbar = new J2StoreToolBar();
         $toolbar->renderLinkbar();
     }
     parent::display($tpl);
 }
コード例 #16
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     //add toolbar
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     // Display the template
     parent::display($tpl);
     $this->setDocument();
 }
コード例 #17
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     if ($this->getLayout() == 'form') {
         $model = $this->getModel('');
         //get the address
         $address = $this->get('Data');
         $this->assignRef('address', $address);
         $this->addToolBar();
         //J2StoreSubmenuHelper::addSubmenu($vName = 'addresses');
     }
     parent::display($tpl);
 }
コード例 #18
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $this->form = $this->get('Form');
     // Get data from the model
     $this->item = $this->get('Item');
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //add toolbar
     $this->addToolBar();
     // Display the template
     parent::display($tpl);
     // Set the document
     $this->setDocument();
 }
コード例 #19
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //add toolbar
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     // Display the template
     parent::display($tpl);
     $this->setDocument();
 }
コード例 #20
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     jimport('joomla.filesystem.file');
     $db = JFactory::getDBO();
     $db_version = $db->getVersion();
     $php_version = phpversion();
     $server = $this->get_server_software();
     $gd_check = extension_loaded('gd');
     $mb_check = extension_loaded('mbstring');
     $this->assignRef('server', $server);
     $this->assignRef('php_version', $php_version);
     $this->assignRef('db_version', $db_version);
     $this->assignRef('gd_check', $gd_check);
     $this->assignRef('mb_check', $mb_check);
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
コード例 #21
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $option = 'com_j2store';
     $model = $this->getModel();
     //is it ok to migrate
     if (!$model->canMigrate() || J2StoreVersion::getPreviousVersion() != '2.0.2' || J2STORE_ATTRIBUTES_MIGRATED == 1) {
         $msg = JText::_('J2STORE_MIGRATE_CURRENT_VERSION');
         $app->redirect('index.php?option=com_j2store&view=cpanel', $msg);
     }
     $db = JFactory::getDBO();
     $params = JComponentHelper::getParams('com_j2store');
     // Get data from the model
     $items = $this->get('Data');
     $total = count($items);
     $this->assignRef('items', $items);
     $this->assignRef('total', $total);
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
コード例 #22
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $country_id = $app->input->getInt('country_id', 1);
     $view = $app->input->getWord('view', 'cpanel');
     $model = $this->getModel('geozone');
     $path = JPATH_ADMINISTRATOR . '/components/com_j2store/views/' . JString::strtolower($view) . '/tmpl';
     $this->addTemplatePath($path);
     $this->form = $this->get('Form');
     // Get data from the model
     $this->model = $this->getModel('geozone');
     $this->item = $this->get('Item');
     //$this->geozonerules = $this->get('GeoZoneRules');
     $this->geozonerules = $model->getGeoZoneRules($this->item->geozone_id);
     // inturn calls getState in parent class and populateState() in model
     $this->state = $this->get('State');
     //get list of countries
     $country_options = $this->get('CountryOptions');
     //generate country filter list
     $lists = array();
     $lists['country'] = JHTML::_('select.genericlist', $country_options, 'jform[country_id]', '', 'value', 'text', $this->state->get('filter.country_options'));
     $this->lists = $lists;
     $this->countryList = $this->model->getCountryList();
     $this->countries = $this->model->getCountry();
     $this->zones = $this->model->getZone($country_id);
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //add toolbar
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     //Display the template
     parent::display($tpl);
     // Set the document
     $this->setDocument();
 }
コード例 #23
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_j2store' . DS . 'library' . DS . 'prices.php';
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = $option . '.report';
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $task = $mainframe->input->getWord('task', '');
     $filter_order = $mainframe->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'tbl.id', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_orderstate = $mainframe->getUserStateFromRequest($ns . 'filter_orderstate', 'filter_orderstate', '', 'string');
     $search = $mainframe->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
     if (strpos($search, '"') !== false) {
         $search = str_replace(array('=', '<'), '', $search);
     }
     $search = JString::strtolower($search);
     // Get data from the model
     $model = $this->getModel('report');
     $items = $model->getList();
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     $javascript = 'onchange="document.adminForm.submit();"';
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('pagination', $pagination);
     $this->params = $params = JComponentHelper::getParams('com_j2store');
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
コード例 #24
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
    function display($tpl = null)
    {
        // initialize the appllication
        $app = JFactory::getApplication();
        $model = $this->getModel('products');
        // get the Layout
        $layout = $this->getLayout();
        $option = 'com_j2store';
        $ns = 'com_j2store.products';
        // Initialize the DB connection
        $db = JFactory::getDbo();
        $uri = JFactory::getURI();
        $params = JComponentHelper::getParams('com_j2store');
        $javascript = 'onchange="document.adminForm.submit();"';
        // Order option based on the user request
        $filter_articles = $app->getUserStateFromRequest($ns . 'filter_article_type', 'filter_article_type', '', 'cmd');
        $filter_order = $app->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'p.id', 'cmd');
        $filter_order_Dir = $app->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
        $filter_orderstate = $app->getUserStateFromRequest($ns . 'filter_orderstate', 'filter_orderstate', '', 'string');
        // Get the  user Reguested String
        $search = $app->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
        if (strpos($search, '"') !== false) {
            $search = str_replace(array('=', '<'), '', $search);
        }
        $search = JString::strtolower($search);
        // table ordering
        $lists['order_Dir'] = $filter_order_Dir;
        $lists['order'] = $filter_order;
        // search filter
        $lists['search'] = $search;
        $this->lists = $lists;
        $ordering = $this->lists['order'] == 'p.ordering';
        $this->assignRef('ordering', $ordering);
        // Joomla! 3.0 drag-n-drop sorting variables
        if (version_compare(JVERSION, '3.0', 'ge')) {
            JHtml::_('bootstrap.tooltip');
            if ($ordering) {
                JHtml::_('sortablelist.sortable', 'productsList', 'adminForm', strtolower($this->lists['order_Dir']), 'index.php?option=com_j2store&view=products&task=saveorder&format=raw');
            }
            $document = JFactory::getDocument();
            $document->addScriptDeclaration('
					Joomla.orderTable = function() {
					table = document.getElementById("sortTable");
					direction = document.getElementById("directionTable");
					order = table.options[table.selectedIndex].value;
					if (order != \'' . $this->lists['order'] . '\') {
					dirn = \'asc\';
		} else {
					dirn = direction.options[direction.selectedIndex].value;
		}
					Joomla.tableOrdering(order, dirn, "");
		}');
        }
        // Get data from the model
        $this->items = $this->get('Data');
        $this->total = $this->get('Total');
        $this->state = $this->get('State');
        $this->pagination = $this->get('Pagination');
        $this->page = $model->getPagination();
        $article_options = array();
        $article_options[] = JHtml::_('select.option', '0', JText::_('J2STORE_PRODUCT_SHOW_ALL_ARTICLES'));
        $article_options[] = JHtml::_('select.option', '1', JText::_('J2STORE_PRODUCT_SHOW_J2STORE_ARTICLES'));
        $this->f_levels = JHtml::_('select.genericlist', $article_options, 'filter_article_type', $javascript, 'value', 'text', $this->state->get('filter_article_type'));
        $categories = JHtml::_('category.options', 'com_content');
        $option = array('' => JText::_('JOPTION_SELECT_CATEGORY'));
        $category_options = array_merge($option, $categories);
        $this->category_options = JHtml::_('select.genericlist', $category_options, 'filter_category_id', $javascript, 'value', 'text', $this->state->get('filter.category_id'));
        $this->params = $params;
        $this->addToolBar();
        $toolbar = new J2StoreToolBar();
        $toolbar->renderLinkbar();
        //$this->sidebar = JHtmlSidebar::render();
        parent::display($tpl);
    }
コード例 #25
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = 'com_j2store.payment';
     $task = $mainframe->input->getCmd('task');
     $session = JFactory::getSession();
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $params = JComponentHelper::getParams('com_j2store');
     $filter_order = $mainframe->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'tbl.id', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_orderstate = $mainframe->getUserStateFromRequest($ns . 'filter_orderstate', 'filter_orderstate', '', 'string');
     $filter_name = $mainframe->getUserStateFromRequest($ns . 'filter_name', 'filter_name', 'tbl.name', 'cmd');
     $search = $mainframe->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
     if (strpos($search, '"') !== false) {
         $search = str_replace(array('=', '<'), '', $search);
     }
     $search = JString::strtolower($search);
     $model = $this->getModel('payment');
     // Get data from the model
     $items = $model->getList();
     $total = $model->getTotal();
     $pagination = $model->getPagination();
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     $lists['filter_name'] = $filter_name;
     $update = array();
     $warning = '';
     //only call once per session. Dont call this often
     if (!$session->has('plugin_update_data', 'j2store')) {
         try {
             require_once JPATH_COMPONENT_ADMINISTRATOR . '/liveupdate/classes/download.php';
             $xmlfile = 'http://cdn.j2store.org/extensions.xml';
             $result = LiveUpdateDownloadHelper::downloadAndReturn($xmlfile);
             if ($result) {
                 $extensions = simplexml_load_string($result, 'SimpleXMLElement');
                 $type = (string) $extensions->extension->attributes()->type;
                 if ($type == 'payment') {
                     $plugins = $extensions->extension->plugins->plugin;
                     foreach ($plugins as $plugin) {
                         $update[(string) $plugin->attributes()->element] = (array) $plugin;
                     }
                 }
                 if (count($update)) {
                     $session->set('plugin_update_data', $update, 'j2store');
                 }
             }
         } catch (Exception $e) {
             $warning = JText::_('J2STORE_PAYMENT_XML_REMOTE_ERROR');
             $this->assignRef('warning', $warning);
         }
     } else {
         $update = $session->get('plugin_update_data', array(), 'j2store');
     }
     $this->assignRef('update', $update);
     // search filter
     $lists['search'] = $search;
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('pagination', $pagination);
     JToolBarHelper::title(JText::_('J2STORE_PAYMENT_PLUGINS'), 'j2store-logo');
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
コード例 #26
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function display($tpl = null)
 {
     parent::display($tpl);
 }
コード例 #27
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
    function display($tpl = null)
    {
        $app = JFactory::getApplication();
        $doc = JFactory::getDocument();
        $model = $this->getModel('field');
        $params = JComponentHelper::getParams('com_j2store');
        $selectableBase = J2StoreFactory::getSelectableBase();
        $fieldid = $app->input->getInt('field_id');
        if (!empty($fieldid)) {
            $field = $selectableBase->getField($fieldid);
            $data = null;
            $allFields = $selectableBase->getFields('', $data, $field->field_table);
        } else {
            $field = $model->getTable();
            $field->field_table = 'address';
            $field->field_published = 1;
            $field->field_type = 'text';
            $field->field_backend = 1;
            $allFields = array();
        }
        $this->allFields = $allFields;
        $this->field = $field;
        $this->fieldsClass = $selectableBase;
        $lists = array();
        //get the field type
        $fieldtype = J2StoreFactory::getSelectableFields();
        $this->assignRef('fieldtype', $fieldtype);
        $script = 'function addLine(){
		var myTable=window.document.getElementById("tablevalues");
		var newline = document.createElement(\'tr\');
		var column = document.createElement(\'td\');
		var column2 = document.createElement(\'td\');
		var column3 = document.createElement(\'td\');
		var input = document.createElement(\'input\');
		var input2 = document.createElement(\'input\');
		var input3 = document.createElement(\'select\');
		var option1 = document.createElement(\'option\');
		var option2 = document.createElement(\'option\');
		input.type = \'text\';
		input2.type = \'text\';
		option1.value= \'0\';
		option2.value= \'1\';
		input.name = \'field_values[title][]\';
		input2.name = \'field_values[value][]\';
		input3.name = \'field_values[disabled][]\';
		option1.text= \'' . JText::_('J2STORE_NO', true) . '\';
		option2.text= \'' . JText::_('J2STORE_YES', true) . '\';
		try { input3.add(option1, null); } catch(ex) { input3.add(option1); }
		try { input3.add(option2, null); } catch(ex) { input3.add(option2); }
		column.appendChild(input);
		column2.appendChild(input2);
		column3.appendChild(input3);
		newline.appendChild(column);
		newline.appendChild(column2);
		newline.appendChild(column3);
		myTable.appendChild(newline);
		}

		function deleteRow(divName,inputName,rowName){
			var d = document.getElementById(divName);
			var olddiv = document.getElementById(inputName);
			if(d && olddiv){
				d.removeChild(olddiv);
				document.getElementById(rowName).style.display="none";
			}
			return false;
		}

		function setVisible(value){
			if(value=="product" || value=="item" || value=="category"){
				document.getElementById(\'category_field\').style.display = "";
			}else{
				document.getElementById(\'category_field\').style.display = \'none\';
			}
		}';
        $doc->addScriptDeclaration($script);
        //	$lists['value_type'] = JHTML::_('select.radiolist', $value_type_options, 'value_type', null, 'value', 'text', $data->value_type);
        //	$logged_options = array(JHTML::_('select.option', '0', JText::_('No') ),
        //			JHTML::_('select.option', '1', JText::_('Yes') )	);
        //	$lists['logged'] = JHTML::_('select.radiolist', $logged_options, 'logged', null, 'value', 'text', $data->logged);
        //country, zone type
        $zoneType = new j2storeZoneType();
        $this->assignRef('zoneType', $zoneType);
        $this->assignRef('lists', $lists);
        $this->assignRef('params', $params);
        $this->addToolBar();
        $toolbar = new J2StoreToolBar();
        $toolbar->renderLinkbar();
        parent::display($tpl);
    }
コード例 #28
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW4
 function _form($tpl = null)
 {
     parent::_form($tpl);
     $row = $this->getModel()->getItem();
     $import = JPluginHelper::importPlugin('j2store', $row->element);
 }