Beispiel #1
0
 function _form($tpl = null)
 {
     parent::_form($tpl);
     // load the plugin
     $row = $this->getModel()->getItem();
     $import = JPluginHelper::importPlugin('Citruscart', $row->element);
 }
Beispiel #2
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, $this->getPath('plg_xml', $row->folder . '/' . $row->element), 'plugin');
         $this->assignRef('params', $params);
     }
 }
Beispiel #3
0
 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);
 }
Beispiel #4
0
 /**
  * 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);
     }
 }
Beispiel #5
0
 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);
     }
 }
Beispiel #6
0
 /**
  * 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);
     }
 }
Beispiel #7
0
 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);
     }
 }
Beispiel #8
0
 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);
     }
 }
Beispiel #9
0
 function _form($tpl = null)
 {
     $model = $this->getModel();
     $item = $model->getItem();
     $this->row = $item;
     if (empty($this->row->coupon_id)) {
         $item = JTable::getInstance('Coupons', 'CitruscartTable');
         //$state->coupon_params = new DSCParameter($state->coupon_params);
         //print_r($state->coupon_params);
         $this->assign('row', $item);
     }
     parent::_form($tpl);
 }
Beispiel #10
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();
         $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);
     }
 }
Beispiel #11
0
 function _form($tpl = null)
 {
     JPluginHelper::importPlugin('citruscart');
     $app = JFactory::getApplication();
     parent::_form($tpl);
     $model = $this->getModel();
     $item = $model->getItem();
     if (empty($item->product_id)) {
         // this is a new product
         $item = JTable::getInstance('Products', 'CitruscartTable');
         $item->product_parameters = new DSCParameter($item->product_params);
         $this->assign('row', $item);
     }
     $results = $app->triggerEvent('onGetProductView', array($model->getItem()));
     $shippingHtml = implode('<hr />', $results);
     $this->assign('shippingHtml', $shippingHtml);
     $elementArticleModel = JModelLegacy::getInstance('ElementArticle', 'CitruscartModel');
     $this->assign('elementArticleModel', $elementArticleModel);
 }
Beispiel #12
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 = 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);
 }
Beispiel #13
0
 /**
  *
  * @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);
 }
Beispiel #14
0
 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);
 }
Beispiel #15
0
 function _form($tpl = null)
 {
     parent::_form($tpl);
     $model = $this->getModel();
     $item = $model->getItem();
     $results = JFactory::getApplication()->triggerEvent('onGetCategoryView', array($item));
     if (empty($item->category_id)) {
         // this is a new product
         $item = JTable::getInstance('Categories', 'CitruscartTable');
         $item->category_params = new DSCParameter($item->category_params);
         $this->assign('row', $item);
     }
     $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);
 }