Example #1
0
 /**
  * Displays the submit bug form
  */
 function submitBug()
 {
     JRequest::setVar('tienda_display_submenu', 1);
     Tienda::load('TiendaViewBase', 'views._base');
     $view = new TiendaViewBase();
     $view->displayTitle(JText::_('COM_TIENDA_SUBMIT_BUG'));
     unset($view);
     ob_start();
     include dirname(__FILE__) . '/bug_report/tmpl/submitbug.php';
     $text = ob_get_contents();
     ob_end_clean();
     return $text;
 }
Example #2
0
 function _default($tpl = null)
 {
     $model = $this->getModel();
     $model->setState('order', 'tbl.ordering');
     $model->setState('direction', 'ASC');
     parent::_default($tpl);
 }
Example #3
0
 /**
  * (non-PHPdoc)
  * @see tienda/admin/views/TiendaViewBase#_defaultToolbar()
  */
 function _defaultToolbar()
 {
     JToolBarHelper::publishList('coupon_enabled.enable');
     JToolBarHelper::unpublishList('coupon_enabled.disable');
     JToolBarHelper::divider();
     parent::_defaultToolbar();
 }
Example #4
0
 function _default($tpl = '', $onlyPagination = false)
 {
     parent::_default($tpl, $onlyPagination);
     if (JRequest::getVar('tmpl') == 'component') {
         $this->assign('tmpl', '&tmpl=component');
     }
 }
Example #5
0
 /**
  * (non-PHPdoc)
  * @see tienda/admin/views/TiendaViewBase#_formToolbar($isNew)
  */
 function _formToolbar($isNew = null)
 {
     if (!$isNew) {
         JToolBarHelper::custom('save_as', 'refresh', 'refresh', 'COM_TIENDA_SAVE_AS', false);
     }
     parent::_formToolbar($isNew);
 }
Example #6
0
 function _form($tpl = null)
 {
     parent::_form($tpl);
     // load the plugin
     $row = $this->getModel()->getItem();
     $import = JPluginHelper::importPlugin('tienda', $row->element);
 }
Example #7
0
 function __construct($config = array())
 {
     parent::__construct($config);
     if (empty($this->helpers)) {
         $this->helpers = array();
     }
     Tienda::load("TiendaHelperProduct", 'helpers.product');
     $this->helpers['product'] = new TiendaHelperProduct();
 }
Example #8
0
 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);
 }
Example #9
0
 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);
     }
 }
Example #10
0
 /**
  * 
  * @param $tpl
  * @return unknown_type
  */
 function display($tpl = null)
 {
     $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);
 }
Example #11
0
 /**
  * We could actually get rid of this override entirely 
  * and just call $items = TiendaHelperPlugin::getPlugins();
  * from within the tmpl file  
  * 
  */
 function _default($tpl = '', $onlyPagination = false)
 {
     parent::_default($tpl);
     Tienda::load('TiendaUrl', 'library.url');
     Tienda::load('TiendaSelect', 'library.select');
     Tienda::load('TiendaHelperUser', 'helpers.user');
     $model = $this->getModel();
     // form
     $form = array();
     $controller = strtolower($this->get('_controller', JRequest::getVar('controller', JRequest::getVar('view'))));
     $view = strtolower($this->get('_view', JRequest::getVar('view')));
     $task = strtolower($this->get('_task', 'edit'));
     $form['action'] = $this->get('_action', "index.php?option=com_tienda&view={$view}");
     $form['validation'] = $this->get('_validation', "index.php?option=com_tienda&controller={$controller}&task=validate&format=raw");
     $form['validate'] = "<input type='hidden' name='" . JUtility::getToken() . "' value='1' />";
     $form['id'] = $model->getId();
     $this->assign('form', $form);
 }
Example #12
0
 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);
 }
Example #13
0
 /**
  * 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);
 }
Example #14
0
 /**
  * 
  * @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);
 }
Example #15
0
 /**
  * Displays a layout file
  *
  * @param unknown_type $tpl
  * @return unknown_type
  */
 function display($tpl = null)
 {
     parent::display($tpl);
 }
Example #16
0
 /**
  * (non-PHPdoc)
  * @see tienda/admin/views/TiendaViewBase#_viewToolbar($isNew)
  */
 function _viewToolbar($isNew = null)
 {
     JToolBarHelper::custom('edit', 'edit', 'edit', JText::_('COM_TIENDA_EDIT'), false);
     JToolBarHelper::divider();
     parent::_viewToolbar($isNew);
 }
Example #17
0
 function _default($tpl = null)
 {
     Tienda::load('TiendaUrl', 'library.url');
     parent::_default($tpl);
 }