/** * (non-PHPdoc) * @see Citruscart/admin/views/CitruscartViewBase#_formToolbar($isNew) */ function _formToolbar($isNew = null) { if (!$isNew) { JToolBarHelper::custom('save_as', 'refresh', 'refresh', 'COM_CITRUSCART_SAVE_AS', false); } parent::_formToolbar($isNew); }
/** * (non-PHPdoc) * @see Citruscart/admin/views/CitruscartViewBase#_defaultToolbar() */ function _defaultToolbar() { JToolBarHelper::publishList('coupon_enabled.enable'); JToolBarHelper::unpublishList('coupon_enabled.disable'); JToolBarHelper::divider(); parent::_defaultToolbar(); }
function _form($tpl = null) { parent::_form($tpl); // load the plugin $row = $this->getModel()->getItem(); $import = JPluginHelper::importPlugin('Citruscart', $row->element); }
/** * Displays the submit bug form */ function submitBug() { /* Get the application */ $app = JFactory::getApplication(); //JRequest::setVar('Citruscart_display_submenu', 1 ); $app->input->set('Citruscart_display_submenu', 1); Citruscart::load('CitruscartViewBase', 'views._base'); $view = new CitruscartViewBase(); $view->displayTitle(JText::_('COM_CITRUSCART_SUBMIT_BUG')); unset($view); ob_start(); include dirname(__FILE__) . '/bug_report/tmpl/submitbug.php'; $text = ob_get_contents(); ob_end_clean(); return $text; }
function __construct($config = array()) { parent::__construct($config); if (empty($this->helpers)) { $this->helpers = array(); } Citruscart::load("CitruscartHelperProduct", 'helpers.product'); $this->helpers['product'] = new CitruscartHelperProduct(); }
function _form($tpl = null) { JHTML::_('script', 'bootstrapped-advanced-ui.js', 'media/citruscart/js/'); JHTML::_('stylesheet', 'bootstrapped-advanced-ui.css', 'media/citruscart/css/'); JHTML::_('stylesheet', 'reports.css', 'media/citruscart/css/'); parent::_form($tpl); // load the plugin $row = $this->getModel()->getItem(); $import = JPluginHelper::importPlugin('Citruscart', $row->element); }
function _default($tpl = '', $onlyPagination = false) { /* Get the application */ $app = JFactory::getApplication(); parent::_default($tpl, $onlyPagination); //if (JRequest::getVar('tmpl') == 'component') if ($app->input->get('tmpl') == 'component') { $this->assign('tmpl', '&tmpl=component'); } }
function _form($tpl = null) { parent::_form($tpl); // the row is already loaded in base view so this might not be needed leaving this hear to help figure this out in joomla 1.5 if needed. if (!version_compare(JVERSION, '1.6.0', 'ge')) { $row = $this->getModel()->getItem(); $params = new DSCParameter($row->params, $this->getPath('plg_xml', $row->folder . '/' . $row->element), 'plugin'); $this->assignRef('params', $params); } }
/** * Method to overwrite * @param $tpl * @see CitruscartViewBase::_form() */ function _form($tpl = null) { parent::_form($tpl); $model = $this->getModel(); $this->row = $model->getItem(); if (empty($this->row->orderpayment_id)) { // this is a new product $item = JTable::getInstance('Orderpayments', 'CitruscartTable'); $this->assign('row', $item); } }
function _form($tpl = null) { parent::_form($tpl); $model = $this->getModel(); $item = $model->getItem(); $this->row = $item; if (empty($this->row->credit_id)) { $item = JTable::getInstance('Credits', 'CitruscartTable'); $this->assign('row', $item); } }
function _form($tpl = null) { parent::_form($tpl); $model = $this->getModel(); $item = $model->getItem(); $this->row = $item; if (empty($this->row->address_id)) { $item = JTable::getInstance('Addresses', 'CitruscartTable'); $this->assign('row', $item); //print_r($item); } }
/** * Method to overwrite * @param $tpl * @see CitruscartViewBase::_form() */ function _form($tpl = null) { $app = JFactory::getApplication(); parent::_form($tpl); $model = $this->getModel(); $this->row = $model->getItem(); if (empty($this->row->tax_class_id)) { // this is a new product $item = JTable::getInstance($app->input->getString('view'), 'CitruscartTable'); $this->assign('row', $item); } }
function _form($tpl = null) { parent::_form($tpl); $model = $this->getModel(); $this->row = $model->getItem(); if (empty($this->row->currency_id)) { // this is a new product $item = JTable::getInstance('Currencies', 'CitruscartTable'); //$item->manufacturer_params = new DSCParameter( $item->manufacturer_params ); $this->assign('row', $item); } }
function _form($tpl = null) { parent::_form($tpl); // the row is already loaded in base view so this might not be needed leaving this hear to help figure this out in joomla 1.5 if needed. if (!version_compare(JVERSION, '1.6.0', 'ge')) { $row = $this->getModel()->getItem(); $path = JPATH_COMPONENT . $row->folder . '/' . $row->element . '/' . 'plg_xml'; $params = new DSCParameter($row->params, $path); //$params = new DSCParameter( $row->params, JApplicationHelper::getPath( 'plg_xml', $row->folder.'/'.$row->element), 'plugin' ); $this->assignRef('params', $params); } $row = $this->getModel()->getItem(); if (!empty($row)) { $this->assign('row', $row); $import = JPluginHelper::importPlugin('Citruscart', $row->element); } }
/** * * @param $tpl * @return unknown_type */ function display($tpl = null, $perform = true) { $layout = $this->getLayout(); switch (strtolower($layout)) { case "view": $this->_form($tpl); break; case "form": $this->_form($tpl); break; case "default": default: $this->_default($tpl); break; } parent::display($tpl); }
/** * Basic methods for a form * @param $tpl * @return unknown_type */ function _form($tpl = '') { parent::_form($tpl); $shop_info = array(); // Get the shop country name $countryModel = JModelLegacy::getInstance('Countries', 'CitruscartModel'); $countryModel->setId(Citruscart::getInstance()->get('shop_country')); $countryItem = $countryModel->getItem(); if ($countryItem) { $shop_info['shop_country_name'] = $countryItem->country_name; } // Get the shop zone name $zoneModel = JModelLegacy::getInstance('Zones', 'CitruscartModel'); $zoneModel->setId(Citruscart::getInstance()->get('shop_zone')); $zoneItem = $zoneModel->getItem(); if ($zoneItem) { $shop_info['shop_zone_name'] = $zoneItem->zone_name; } $this->assign('shop_info', (object) $shop_info); }
/** * * @param unknown_type $tpl */ function _form($tpl = null) { $model = $this->getModel(); $item = $model->getItem(); $this->assign('item', $item); // Products $productModel = JModelLegacy::getInstance('ElementProduct', 'CitruscartModel'); // terms $elementArticle_product = $productModel->fetchElement('product_id', $item->product_id); $resetArticle_product = $productModel->clearElement('product_id', '0'); $this->assign('elementArticle_product', $elementArticle_product); $this->assign('resetArticle_product', $resetArticle_product); $userModel = JModelLegacy::getInstance('ElementUser', 'CitruscartModel'); // terms $elementUser_product = $userModel->fetchElement('user_id', $item->user_id); $resetUser_product = $userModel->clearElement('user_id', '0'); $this->assign('elementUser_product', $elementUser_product); $this->assign('resetUser_product', $resetUser_product); parent::_form($tpl); }
/** * We could actually get rid of this override entirely * and just call $items = CitruscartHelperPlugin::getPlugins(); * from within the tmpl file * */ function _default($tpl = '', $onlyPagination = false) { parent::_default($tpl); /* Get the application */ $app = JFactory::getApplication(); Citruscart::load('CitruscartUrl', 'library.url'); Citruscart::load('CitruscartSelect', 'library.select'); Citruscart::load('CitruscartHelperUser', 'helpers.user'); $model = $this->getModel(); // form $form = array(); //$controller = strtolower( $this->get( '_controller', JRequest::getVar('controller', JRequest::getVar('view') ) ) ); $controller = strtolower($this->get('_controller', $app->input->getString('controller', $app->input->getString('view')))); //$view = strtolower( $this->get( '_view', JRequest::getVar('view') ) ); $view = strtolower($this->get('_view', $app->input->getString('view'))); $task = strtolower($this->get('_task', 'edit')); $form['action'] = $this->get('_action', "index.php?option=com_citruscart&view={$view}"); $form['validation'] = $this->get('_validation', "index.php?option=com_citruscart&controller={$controller}&task=validate&format=raw"); $form['validate'] = "<input type='hidden' name='" . JSession::getFormToken() . "' value='1' />"; $form['id'] = $model->getId(); $this->assign('form', $form); }
function _form($tpl = null) { /* Get the application */ $app = JFactory::getApplication(); /* Get the id values */ $id = $app->input->get('id', ''); //$id = JRequest::getVar('id', ''); $model = $this->getModel(); $item = $model->getItem($id); $items = JArrayHelper::fromObject($item); switch ($items['eaventity_type']) { case 'products': // Products $productModel = JModelLegacy::getInstance('ElementProduct', 'CitruscartModel'); // terms $product = JTable::getInstance('Products', 'CitruscartTable'); $product->load($items['eaventity_id']); $elementArticle_product = $productModel->fetchElement('eaventity_id', $product->product_name); $resetArticle_product = $productModel->clearElement('eaventity_id', '0'); $this->assign('elementproduct', $elementArticle_product); $this->assign('resetproduct', $resetArticle_product); } parent::_form($tpl); }
/** * Displays a layout file * * @param unknown_type $tpl * @return unknown_type */ function display($tpl = null) { parent::display($tpl); }
function _default($tpl = null) { Citruscart::load('CitruscartUrl', 'library.url'); parent::_default($tpl); }
/** * (non-PHPdoc) * @see Citruscart/admin/views/CitruscartViewBase#_viewToolbar($isNew) */ function _viewToolbar($isNew = null) { JToolBarHelper::custom('edit', 'edit', 'edit', 'COM_CITRUSCART_EDIT', false); JToolBarHelper::divider(); parent::_viewToolbar($isNew); }
function dispaly($tpl = null) { //$this->addToolBar(); parent::display($tpl); }