function _form($tpl = null) { parent::_form($tpl); // load the plugin $row = $this->getModel()->getItem(); $import = JPluginHelper::importPlugin('tienda', $row->element); }
function _form($tpl = null) { JHTML::_('script', 'bootstrapped-advanced-ui.js', 'media/dioscouri/js/'); JHTML::_('stylesheet', 'bootstrapped-advanced-ui.css', 'media/dioscouri/css/'); JHTML::_('stylesheet', 'reports.css', 'media/com_tienda/css/'); parent::_form($tpl); // load the plugin $row = $this->getModel()->getItem(); $import = JPluginHelper::importPlugin('tienda', $row->element); }
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, JApplicationHelper::getPath('plg_xml', $row->folder . '/' . $row->element), 'plugin'); $this->assignRef('params', $params); } }
function _form($tpl = null) { parent::_form($tpl); $model = $this->getModel(); $dispatcher = JDispatcher::getInstance(); $results = $dispatcher->trigger('onGetCategoryView', array($model->getItem())); $shippingHtml = implode('<hr />', $results); if (!isset($this->row)) { $this->row = new stdClass(); } if (!isset($this->row->display_name_subcategory)) { $this->row->display_name_subcategory = 1; } if (!isset($this->row->display_name_category)) { $this->row->display_name_category = 1; } $this->assign('shippingHtml', $shippingHtml); }
function _form($tpl = null) { parent::_form($tpl); $model = $this->getModel(); $item = $model->getItem(); if (empty($item->product_id)) { // this is a new product $item = JTable::getInstance('Products', 'TiendaTable'); $item->product_parameters = new DSCParameter($item->product_params); $this->assign('row', $item); } $dispatcher = JDispatcher::getInstance(); $results = $dispatcher->trigger('onGetProductView', array($model->getItem())); $shippingHtml = implode('<hr />', $results); $this->assign('shippingHtml', $shippingHtml); $elementArticleModel = JModel::getInstance('ElementArticle', 'TiendaModel'); $this->assign('elementArticleModel', $elementArticleModel); }
function _form($tpl = null) { $id = JRequest::getVar('id', ''); $model = $this->getModel(); $item = $model->getItem($id); switch (@$item->eaventity_type) { case 'products': // Products $productModel = JModel::getInstance('ElementProduct', 'TiendaModel'); // terms $product = JTable::getInstance('Products', 'TiendaTable'); $product->load(@$item->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); }
/** * 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 = JModel::getInstance('Countries', 'TiendaModel'); $countryModel->setId(Tienda::getInstance()->get('shop_country')); $countryItem = $countryModel->getItem(); if ($countryItem) { $shop_info['shop_country_name'] = $countryItem->country_name; } // Get the shop zone name $zoneModel = JModel::getInstance('Zones', 'TiendaModel'); $zoneModel->setId(Tienda::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 = JModel::getInstance('ElementProduct', 'TiendaModel'); // 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 = JModel::getInstance('ElementUser', 'TiendaModel'); // 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); }