Example #1
0
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     $model = VmModel::getModel('country');
     $zoneModel = VmModel::getModel('worldzones');
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $country = $model->getData();
         $this->assignRef('country', $country);
         $this->assignRef('worldZones', $zoneModel->getWorldZonesSelectList());
         $this->addStandardEditViewCommands();
     } else {
         $this->addStandardDefaultViewCommands(true, false);
         //First the view lists, it sets the state of the model
         $this->addStandardDefaultViewLists($model, 0, 'ASC');
         $filter_country = JRequest::getWord('filter_country', false);
         $countries = $model->getCountries(false, false, $filter_country);
         $this->assignRef('countries', $countries);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     $this->loadHelper('html');
     $model = VmModel::getModel();
     // TODO icon for this view
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $this->usergroup = $model->getUsergroup();
         $this->addStandardEditViewCommands();
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->addStandardDefaultViewCommands();
         }
         $this->addStandardDefaultViewLists($model);
         $this->usergroups = $model->getUsergroups(false, true);
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
Example #3
0
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     $model = VmModel::getModel();
     $config = JFactory::getConfig();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $cid = JRequest::getVar('cid');
         $task = JRequest::getWord('task', 'add');
         //JArrayHelper::toInteger($cid);
         if ($task != 'add' && !empty($cid) && !empty($cid[0])) {
             $cid = (int) $cid[0];
         } else {
             $cid = 0;
         }
         $model->setId($cid);
         $currency = $model->getCurrency();
         $this->SetViewTitle('', $currency->currency_name);
         $this->assignRef('currency', $currency);
         $this->addStandardEditViewCommands();
     } else {
         $this->SetViewTitle();
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, 0, 'ASC');
         $currencies = $model->getCurrenciesList(JRequest::getWord('search', false));
         $this->assignRef('currencies', $currencies);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
Example #4
0
 /**
  * Collect all data to show on the template
  *
  * @author RolandD, Max Milbers
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $session = JFactory::getSession();
     parent::display($tpl);
 }
Example #5
0
 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmConfig')) {
         require JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'config.php';
     }
     VmConfig::loadConfig();
     VmConfig::loadJLang('com_virtuemart_countries');
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel('country');
     $zoneModel = VmModel::getModel('worldzones');
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $country = $model->getData();
         $this->assignRef('country', $country);
         $wzsList = $zoneModel->getWorldZonesSelectList();
         $this->assignRef('worldZones', $wzsList);
         $this->addStandardEditViewCommands();
     } else {
         $this->addStandardDefaultViewCommands(true, false);
         //First the view lists, it sets the state of the model
         $this->addStandardDefaultViewLists($model, 0, 'ASC');
         $filter_country = JRequest::getWord('filter_country', false);
         $countries = $model->getCountries(false, false, $filter_country);
         $this->assignRef('countries', $countries);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
Example #6
0
 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = $this->getLayout();
     $task = vRequest::getCmd('task', $layoutName);
     $this->assignRef('task', $task);
     if ($layoutName == 'edit') {
         //For shoppergroup specific price display
         VmConfig::loadJLang('com_virtuemart_config');
         VmConfig::loadJLang('com_virtuemart_shoppers', true);
         $shoppergroup = $model->getShopperGroup();
         $this->SetViewTitle('SHOPPERGROUP', $shoppergroup->shopper_group_name);
         $vendors = ShopFunctions::renderVendorList($shoppergroup->virtuemart_vendor_id);
         $this->assignRef('vendorList', $vendors);
         $this->assignRef('shoppergroup', $shoppergroup);
         $this->addStandardEditViewCommands();
     } else {
         $this->SetViewTitle();
         $showVendors = $this->showVendors();
         $this->assignRef('showVendors', $showVendors);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $shoppergroups = $model->getShopperGroups(false, true);
         $this->assignRef('shoppergroups', $shoppergroups);
         $pagination = $model->getPagination();
         $this->assignRef('sgrppagination', $pagination);
     }
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     // get necessary model
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $manufacturerCategory = $model->getData();
         $this->manufacturerCategory = $manufacturerCategory;
         $this->SetViewTitle('MANUFACTURER_CATEGORY', $manufacturerCategory->mf_category_name);
         $this->addStandardEditViewCommands($manufacturerCategory->virtuemart_manufacturercategories_id);
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle('MANUFACTURER_CATEGORY');
             $this->addStandardDefaultViewCommands();
         }
         $this->addStandardDefaultViewLists($model);
         $this->manufacturerCategories = $model->getManufacturerCategories();
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     JLoader::register('VmImage', JPATH_VM_ADMINISTRATOR . '/helpers/image.php');
     $virtuemart_manufacturer_id = JRequest::getInt('virtuemart_manufacturer_id', 0);
     $mf_category_id = JRequest::getInt('mf_category_id', 0);
     // get necessary models
     $model = VmModel::getModel('manufacturer');
     if ($virtuemart_manufacturer_id != 0) {
         $manufacturer = $model->getManufacturer();
         $model->addImages($manufacturer, 1);
         $manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"', false);
         $document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_DETAILS') . ' ' . strip_tags($manufacturer->mf_name));
         $this->assignRef('manufacturerImage', $manufacturerImage);
         // 			$this->assignRef('manufacturerProductsURL', $manufacturerProductsURL);
         $this->assignRef('manufacturer', $manufacturer);
         $pathway->addItem(strip_tags($manufacturer->mf_name));
         $this->setLayout('details');
         // 			vmdebug('$manufacturer',$manufacturer);
     } else {
         $document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_PAGE'));
         $manufacturers = $model->getManufacturers(true, true, true);
         $model->addImages($manufacturers, 1);
         $this->assignRef('manufacturers', $manufacturers);
         $this->setLayout('default');
     }
     parent::display($tpl);
 }
Example #9
0
 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $config = JFactory::getConfig();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $cid = vRequest::getInt('cid');
         $task = vRequest::getCmd('task', 'add');
         if ($task != 'add' && !empty($cid) && !empty($cid[0])) {
             $cid = (int) $cid[0];
         } else {
             $cid = 0;
         }
         $model->setId($cid);
         $currency = $model->getCurrency();
         $this->SetViewTitle('', $currency->currency_name);
         $this->assignRef('currency', $currency);
         $this->addStandardEditViewCommands();
     } else {
         $this->SetViewTitle();
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, 0, 'ASC');
         $currencies = $model->getCurrenciesList(vRequest::getCmd('search', false));
         $this->assignRef('currencies', $currencies);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
Example #10
0
 function display($tpl = null)
 {
     //Load helpers
     $this->loadHelper('currencydisplay');
     $this->loadHelper('html');
     // Get the data
     $model = VmModel::getModel('product');
     // Create filter
     $this->addStandardDefaultViewLists($model);
     $inventorylist = $model->getProductListing(false, false);
     $pagination = $model->getPagination();
     $this->assignRef('pagination', $pagination);
     // Apply currency
     $currencydisplay = CurrencyDisplay::getInstance();
     foreach ($inventorylist as $virtuemart_product_id => $product) {
         //TODO oculd be interesting to show the price for each product, and all stored ones $product->product_in_stock
         $product->product_instock_value = $currencydisplay->priceDisplay($product->product_price, '', $product->product_in_stock, false);
         $product->product_price_display = $currencydisplay->priceDisplay($product->product_price, '', 1, false);
         $product->weigth_unit_display = ShopFunctions::renderWeightUnit($product->product_weight_uom);
     }
     $this->assignRef('inventorylist', $inventorylist);
     $options = array();
     $options[] = JHTML::_('select.option', '', JText::_('COM_VIRTUEMART_DISPLAY_STOCK') . ':');
     $options[] = JHTML::_('select.option', 'stocklow', JText::_('COM_VIRTUEMART_STOCK_LEVEL_LOW'));
     $options[] = JHTML::_('select.option', 'stockout', JText::_('COM_VIRTUEMART_STOCK_LEVEL_OUT'));
     $this->lists['stockfilter'] = JHTML::_('select.genericlist', $options, 'search_type', 'onChange="document.adminForm.submit(); return false;"', 'value', 'text', JRequest::getVar('search_type'));
     $this->lists['filter_product'] = JRequest::getVar('filter_product');
     // $this->assignRef('lists', $lists);
     /* Toolbar */
     $this->SetViewTitle('PRODUCT_INVENTORY');
     JToolBarHelper::publish();
     JToolBarHelper::unpublish();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $this->currency = $model->getData();
         $this->SetViewTitle('', $this->currency->currency_name);
         $this->addStandardEditViewCommands();
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle();
             $this->addStandardDefaultViewCommands();
         }
         $this->addStandardDefaultViewLists($model, 0, 'ASC');
         $this->currencies = $model->getCurrenciesList(JRequest::getWord('search', false));
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
Example #12
0
 function display($tpl = null)
 {
     // Load the helper(s)
     jimport('joomla.filesystem.file');
     $config = JFactory::getConfig();
     $log_path = $config->get('log_path', JPATH_ROOT . "/log");
     $layoutName = vRequest::getCmd('layout', 'default');
     VmConfig::loadJLang('com_virtuemart_log');
     if ($layoutName == 'edit') {
         $logFile = vRequest::getString('logfile', '');
         $this->SetViewTitle('LOG', $logFile);
         $fileContent = file_get_contents($log_path . DS . $logFile);
         $fileContentByLine = explode("\n", $fileContent);
         $this->assignRef('fileContentByLine', $fileContentByLine);
         JToolBarHelper::cancel();
     } else {
         if (!class_exists('JFolder')) {
             require JPATH_VM_LIBRARIES . DS . 'joomla' . DS . 'filesystem' . DS . 'folder.php';
         }
         $logFiles = JFolder::files($log_path, $filter = '.', true, false, array('index.html'));
         $this->SetViewTitle('LOG');
         $this->assignRef('logFiles', $logFiles);
         $this->assignRef('path', $log_path);
     }
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     // 		$this->assignRef('perms', Permissions::getInstance());
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $shoppergroup = $model->getShopperGroup();
         $this->SetViewTitle('SHOPPERGROUP', $shoppergroup->shopper_group_name);
         $vendors = ShopFunctions::renderVendorList($shoppergroup->virtuemart_vendor_id);
         $this->assignRef('vendorList', $vendors);
         $this->assignRef('shoppergroup', $shoppergroup);
         $this->addStandardEditViewCommands();
     } else {
         $this->SetViewTitle();
         JToolBarHelper::makeDefault();
         $this->loadHelper('permissions');
         $showVendors = Permissions::getInstance()->check('admin');
         $this->assignRef('showVendors', $showVendors);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $shoppergroups = $model->getShopperGroups(false, true);
         $this->assignRef('shoppergroups', $shoppergroups);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
Example #14
0
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $document = JFactory::getDocument();
     $layoutName = $this->getLayout();
     $document->setMetaData('robots', 'NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('permissions');
     $this->loadHelper('html');
     if (!class_exists('vmPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmplugin.php';
     }
     $this->perms = Permissions::getInstance();
     $model = VmModel::getModel('paymentmethod');
     //@todo should be depended by loggedVendor
     //		$vendorId=1;
     //		$this->assignRef('vendorId', $vendorId);
     $vendorModel = VmModel::getModel('vendor');
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $currencyModel = VmModel::getModel('currency');
     $currencyModel->setId($vendor->vendor_currency);
     $currency = $currencyModel->getData();
     $this->vendor_currency = $currency->currency_symbol;
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         // Load the helper(s)
         $this->loadHelper('image');
         // jimport('joomla.html.pane');
         $this->payment = $model->getPayment();
         // $this->vmPPaymentList = self::InstalledPaymentPlgSelectList($payment->payment_jplugin_id);
         //			$this->assignRef('PaymentTypeList',self::renderPaymentRadioList($paym->payment_type));
         //			$this->assignRef('creditCardList',self::renderCreditCardRadioList($paym->payment_creditcards));
         //			echo 'humpf <pre>'.print_r($paym).'</pre>' ;
         //$this->assignRef('creditCardList',ShopFunctions::renderCreditCardList($paym->payment_creditcards,true));
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($this->payment->virtuemart_shoppergroup_ids, true);
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $this->vendorList = ShopFunctions::renderVendorList($this->payment->virtuemart_vendor_id);
         }
         // TODO logo
         $this->SetViewTitle('', $this->payment->payment_name);
         $this->addStandardEditViewCommands($this->payment->virtuemart_paymentmethod_id);
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle();
             $this->addStandardDefaultViewCommands();
             // know payment list
             $this->installedPayments = $this->PaymentPlgList();
         }
         $this->addStandardDefaultViewLists($model);
         $this->payments = $model->getPayments();
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
Example #16
0
 /**
  * Collect all data to show on the template
  *
  * @author RolandD, Max Milbers
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $virtuemart_price_id = $input->getInt('virtuemart_price_id', 0);
     $trip_model = tmsModel::getModel('trip');
     $this->trip = $trip_model->getItem($virtuemart_price_id);
     $product_model = tmsModel::getModel('product');
     $this->product = $product_model->getItem($this->trip->virtuemart_product_id);
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $document = JFactory::getDocument();
     //       $paymentResponse = JRequest::getVar('paymentResponse', '');
     //Why do you we allow raw here?
     //       $paymentResponseHtml = JRequest::getVar('paymentResponseHtml','','default','STRING',JREQUEST_ALLOWRAW);
     $document->setMetaData('robots', 'NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
     parent::display($tpl);
 }
Example #18
0
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $document = JFactory::getDocument();
     //       $paymentResponse = JRequest::getVar('paymentResponse', '');
     //Why do you we allow raw here?
     //       $paymentResponseHtml = JRequest::getVar('paymentResponseHtml','','default','STRING',JREQUEST_ALLOWRAW);
     $layoutName = $this->getLayout();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     $this->loadHelper('html');
     $this->loadHelper('permissions');
     //@todo should be depended by loggedVendor
     $this->vendorId = 1;
     $titleMsg = '';
     $model = VmModel::getModel();
     $this->perms = Permissions::getInstance();
     // to add in vmview ?
     $multivendor = Vmconfig::get('multix', 'none');
     $this->multiX = $multivendor !== 'none' && $multivendor != '' ? true : false;
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $this->media = $model->getFile();
         $this->addStandardEditViewCommands();
     } else {
         $this->cat_id = 0;
         if ($this->product_id = JRequest::getInt('virtuemart_product_id', 0)) {
             $product = VmModel::getModel('product')->getProductSingle($this->product_id, false, false);
             $this->link = $this->editLink($this->product_id, '<i class="icon-edit"></i> ' . $product->product_name, 'virtuemart_product_id', array('class' => 'hasTooltip btn btn-inverse', 'title' => JText::_('COM_VIRTUEMART_EDIT') . ' ' . $product->product_name), 'product');
             $titleMsg = $product->product_name;
         } else {
             if ($this->cat_id = JRequest::getInt('virtuemart_category_id', 0)) {
                 $category = VmModel::getModel('category')->getCategory($this->cat_id, false);
                 $this->link = $this->editLink($this->cat_id, '<i class="icon-edit"></i> ' . $category->category_name, 'virtuemart_category_id', array('class' => 'hasTooltip btn btn-inverse', 'title' => JText::_('COM_VIRTUEMART_EDIT') . ' ' . $category->category_name), 'category');
                 $titleMsg = $category->category_name;
             }
         }
         // RAW render
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             if ($this->adminVendor == 1) {
                 JToolBarHelper::custom('synchronizeMedia', 'new', 'new', JText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
                 if ($this->multiX) {
                     JToolBarHelper::custom('toggle.shared.1', 'ok', 'yes', JText::_('COM_VIRTUEMART_SHARED'), true);
                     JToolBarHelper::custom('toggle.shared.0', 'cancel', 'no', JText::_('COM_VIRTUEMART_SHARED'), true);
                 }
             }
             $this->addStandardDefaultViewCommands();
         }
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => '- ' . JText::_('COM_VIRTUEMART_TYPE') . ' -', 'product' => JText::_('COM_VIRTUEMART_PRODUCT'), 'category' => JText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => JText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => JText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'), $options, 1, '', 'onchange="Joomla.ajaxSearch(this); return false;"');
         $options = array('' => JText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => JText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => JText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => JText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
         $this->lists['search_role'] = VmHTML::selectList('search_role', JRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
         $this->files = $model->getFiles(false, false, $this->product_id, $this->cat_id);
         $this->pagination = $model->getPagination();
     }
     // TODO add icon for media view
     $this->SetViewTitle('', $titleMsg);
     parent::display($tpl);
 }
Example #20
0
 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     if (!class_exists('vmCustomPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmcustomplugin.php';
     }
     $model = VmModel::getModel();
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     // TODO Make an Icon for custom
     $this->SetViewTitle('PRODUCT_CUSTOM_FIELD');
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $this->addStandardEditViewCommands();
         $customPlugin = '';
         if (!class_exists('vmParameters')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
         }
         $custom = $model->getCustom();
         $customfields = VmModel::getModel('customfields');
         // 			vmdebug('VirtuemartViewCustom',$custom);
         JPluginHelper::importPlugin('vmcustom');
         $dispatcher = JDispatcher::getInstance();
         $retValue = $dispatcher->trigger('plgVmOnDisplayEdit', array($custom->virtuemart_custom_id, &$customPlugin));
         $this->SetViewTitle('PRODUCT_CUSTOM_FIELD', $custom->custom_title);
         $selected = 0;
         if (!empty($custom->custom_jplugin_id)) {
             $selected = $custom->custom_jplugin_id;
         }
         $pluginList = self::renderInstalledCustomPlugins($selected);
         $this->assignRef('customPlugin', $customPlugin);
         $this->assignRef('pluginList', $pluginList);
         $this->assignRef('custom', $custom);
         $this->assignRef('customfields', $customfields);
     } else {
         JToolBarHelper::custom('createClone', 'copy', 'copy', JText::_('COM_VIRTUEMART_CLONE'), true);
         JToolBarHelper::custom('toggle.admin_only.1', 'publish', '', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true);
         JToolBarHelper::custom('toggle.admin_only.0', 'unpublish', '', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true);
         JToolBarHelper::custom('toggle.is_hidden.1', 'publish', '', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true);
         JToolBarHelper::custom('toggle.is_hidden.0', 'unpublish', '', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $customs = $model->getCustoms(JRequest::getInt('custom_parent_id'), JRequest::getWord('keyword'));
         $this->assignRef('customs', $customs);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     $latestVersion = JRequest::getVar('latestverison', '');
     JToolBarHelper::title(JTEXT::_('COM_VIRTUEMART_UPDATE_MIGRATION'), 'head vm_config_48');
     // 		$this->loadHelper('connection');
     $this->loadHelper('image');
     $this->loadHelper('html');
     // $this->assignRef('checkbutton_style', $checkbutton_style);
     // $this->assignRef('downloadbutton_style', $downloadbutton_style);
     // $this->assignRef('latestVersion', $latestVersion);
     $this->analyse = $this->analyseTables();
     parent::display($tpl);
 }
Example #22
0
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(JPATH_VM_ADMINISTRATOR . DS . 'helpers');
     $this->loadHelper('permissions');
     $this->loadHelper('html');
     $this->addHelperPath(JPATH_VM_PLUGINS);
     $this->loadHelper('vmplugin');
     $this->assignRef('perms', Permissions::getInstance());
     $model = VmModel::getModel('paymentmethod');
     //@todo should be depended by loggedVendor
     //		$vendorId=1;
     //		$this->assignRef('vendorId', $vendorId);
     // TODO logo
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     $vendorModel = VmModel::getModel('vendor');
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $currencyModel = VmModel::getModel('currency');
     $currencyModel = $currencyModel->getCurrency($vendor->vendor_currency);
     $this->assignRef('vendor_currency', $currencyModel->currency_symbol);
     if ($layoutName == 'edit') {
         // Load the helper(s)
         $this->loadHelper('image');
         // $this->loadHelper('html');
         $this->loadHelper('parameterparser');
         // jimport('joomla.html.pane');
         $payment = $model->getPayment();
         $this->assignRef('payment', $payment);
         $this->assignRef('vmPPaymentList', self::renderInstalledPaymentPlugins($payment->payment_jplugin_id));
         //			$this->assignRef('PaymentTypeList',self::renderPaymentRadioList($paym->payment_type));
         //			$this->assignRef('creditCardList',self::renderCreditCardRadioList($paym->payment_creditcards));
         //			echo 'humpf <pre>'.print_r($paym).'</pre>' ;
         //$this->assignRef('creditCardList',ShopFunctions::renderCreditCardList($paym->payment_creditcards,true));
         $this->assignRef('shopperGroupList', ShopFunctions::renderShopperGroupList($payment->virtuemart_shoppergroup_ids, true));
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $vendorList = ShopFunctions::renderVendorList($payment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->addStandardEditViewCommands($payment->virtuemart_paymentmethod_id);
     } else {
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $payments = $model->getPayments();
         $this->assignRef('payments', $payments);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
Example #23
0
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(JPATH_VM_ADMINISTRATOR . DS . 'helpers');
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (!class_exists('vmPSPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmpsplugin.php';
     }
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $shipment = $model->getShipment();
         if (!class_exists('VmImage')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php';
         }
         if (!class_exists('vmParameters')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
         }
         if (!class_exists('VirtueMartModelVendor')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'vendor.php';
         }
         $vendor_id = 1;
         $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
         $this->assignRef('vendor_currency', $currency->currency_symbol);
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->assignRef('pluginList', self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id));
         $this->assignRef('shipment', $shipment);
         $this->assignRef('shopperGroupList', ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true));
         $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
     } else {
         JToolBarHelper::custom('cloneshipment', 'copy', 'copy', JText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $shipments = $model->getShipments();
         $this->assignRef('shipments', $shipments);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     $this->loadHelper('vmcustomplugin');
     $model = VmModel::getModel();
     $this->loadHelper('permissions');
     $this->customfields = VmModel::getModel('customfields');
     // TODO Make an Icon for custom
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $this->addStandardEditViewCommands();
         $customPlugin = '';
         // TOTO JPARAMETER $this->loadHelper('parameterparser');
         $custom = $model->getCustom();
         // 			vmdebug('VirtuemartViewCustom',$custom);
         JPluginHelper::importPlugin('vmcustom');
         $dispatcher = JDispatcher::getInstance();
         $retValue = $dispatcher->trigger('plgVmOnDisplayEdit', array($custom->virtuemart_custom_id, &$customPlugin));
         $this->SetViewTitle('PRODUCT_CUSTOM_FIELD', $custom->custom_title);
         $selected = 0;
         if (!empty($custom->custom_jplugin_id)) {
             $selected = $custom->custom_jplugin_id;
         }
         // $this->pluginList = $this->renderInstalledCustomPlugins($selected);
         $this->customPlugin = $customPlugin;
         $this->custom = $custom;
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle('PRODUCT_CUSTOM_FIELD');
             JToolBarHelper::custom('createClone', 'copy', 'copy', JText::_('COM_VIRTUEMART_CLONE'), true);
             JToolBarHelper::custom('toggle.admin_only.1', 'publish', '', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true);
             JToolBarHelper::custom('toggle.admin_only.0', 'unpublish', '', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true);
             JToolBarHelper::custom('toggle.is_hidden.1', 'publish', '', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true);
             JToolBarHelper::custom('toggle.is_hidden.0', 'unpublish', '', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true);
             $this->addStandardDefaultViewCommands();
             $this->installedCustoms = $this->renderInstalledCustomPlugins(null, true);
             $this->customfieldTypes = $this->customfields->getField_types();
         }
         $this->addStandardDefaultViewLists($model, 0, 'DESC', 'keyword');
         $this->customs = $model->getCustoms(JRequest::getInt('custom_parent_id'), JRequest::getWord('keyword'));
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
Example #25
0
 function display($tpl = null)
 {
     if (!class_exists('VmImage')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php';
     }
     VmConfig::loadJLang('com_virtuemart_orders', TRUE);
     $model = VmModel::getModel('virtuemart');
     $nbrCustomers = $model->getTotalCustomers();
     $this->assignRef('nbrCustomers', $nbrCustomers);
     $nbrActiveProducts = $model->getTotalActiveProducts();
     $this->assignRef('nbrActiveProducts', $nbrActiveProducts);
     $nbrInActiveProducts = $model->getTotalInActiveProducts();
     $this->assignRef('nbrInActiveProducts', $nbrInActiveProducts);
     $nbrFeaturedProducts = $model->getTotalFeaturedProducts();
     $this->assignRef('nbrFeaturedProducts', $nbrFeaturedProducts);
     $ordersByStatus = $model->getTotalOrdersByStatus();
     $this->assignRef('ordersByStatus', $ordersByStatus);
     $recentOrders = $model->getRecentOrders();
     if (!class_exists('CurrencyDisplay')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php';
     }
     /* Apply currency This must be done per order since it's vendor specific */
     $_currencies = array();
     // Save the currency data during this loop for performance reasons
     foreach ($recentOrders as $virtuemart_order_id => $order) {
         //This is really interesting for multi-X, but I avoid to support it now already, lets stay it in the code
         if (!array_key_exists('v' . $order->virtuemart_vendor_id, $_currencies)) {
             $_currencies['v' . $order->virtuemart_vendor_id] = CurrencyDisplay::getInstance('', $order->virtuemart_vendor_id);
         }
         $order->order_total = $_currencies['v' . $order->virtuemart_vendor_id]->priceDisplay($order->order_total);
     }
     $this->assignRef('recentOrders', $recentOrders);
     $recentCustomers = $model->getRecentCustomers();
     $this->assignRef('recentCustomers', $recentCustomers);
     if (!class_exists('ShopFunctions')) {
         require JPATH_VM_ADMINISTRATOR . '/helpers/shopfunctions.php';
     }
     $extensionsFeed = ShopFunctions::getExtensionsRssFeed();
     $this->assignRef('extensionsFeed', $extensionsFeed);
     $virtuemartFeed = ShopFunctions::getVirtueMartRssFeed();
     $this->assignRef('virtuemartFeed', $virtuemartFeed);
     // Options button.
     // if ( !JVM_VERSION===1) {
     // if (JFactory::getUser()->authorise('core.admin', 'com_virtuemart')) {
     // JToolBarHelper::preferences('com_virtuemart');
     // }
     // }
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(JPATH_VM_ADMINISTRATOR . '/helpers');
     $this->loadHelper('permissions');
     $this->loadHelper('vmpsplugin');
     $this->loadHelper('html');
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $shipment = $model->getShipment();
         $this->loadHelper('image');
         // $this->loadHelper('html');
         // $this->loadHelper('parameterparser');
         // jimport('joomla.html.pane');
         if (!class_exists('VirtueMartModelVendor')) {
             require JPATH_VM_ADMINISTRATOR . '/models' . DS . 'vendor.php';
         }
         $vendor_id = 1;
         $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
         $this->vendor_currency = $currency->currency_symbol;
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $this->vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
         }
         $this->pluginList = self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id);
         $this->shipment = $shipment;
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true);
         $this->SetViewTitle('', $shipment->shipment_name);
         $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle();
             JToolBarHelper::custom('cloneshipment', 'copy', 'copy', JText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
             $this->addStandardDefaultViewCommands();
             $this->installedShipments = $this->shipmentsPlgList();
         }
         $this->addStandardDefaultViewLists($model);
         $this->shipments = $model->getShipments();
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
 public function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $layoutName = $this->getLayout();
     if (!$layoutName) {
         $layoutName = JRequest::getWord('layout', 'default');
     }
     $this->assignRef('layoutName', $layoutName);
     $format = JRequest::getWord('format');
     JLoader::register('VirtueMartCart', JPATH_VM_SITE . '/helpers/cart.php');
     $cart = VirtueMartCart::getCart();
     $this->assignRef('cart', $cart);
     $this->prepareContinueLink();
     shopFunctionsF::setVmTemplate($this, 0, 0, $layoutName);
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     // 'A' : sotck Available
     // 'O' : stock Out
     // 'R' : stock reserved
     $this->stockHandelList = array('A' => 'COM_VIRTUEMART_ORDER_STATUS_STOCK_AVAILABLE', 'R' => 'COM_VIRTUEMART_ORDER_STATUS_STOCK_RESERVED', 'O' => 'COM_VIRTUEMART_ORDER_STATUS_STOCK_OUT');
     if ($layoutName == 'edit') {
         $orderStatus = $model->getData();
         $this->SetViewTitle('', JText::_($orderStatus->order_status_name));
         if (!$orderStatus->virtuemart_orderstate_id) {
             $this->assignRef('ordering', JText::_('COM_VIRTUEMART_NEW_ITEMS_PLACE'));
         } else {
             // Ordering dropdown
             $qry = 'SELECT ordering AS value, order_status_name AS text' . ' FROM #__virtuemart_orderstates' . ' ORDER BY ordering';
             // $ordering = JHTML::_('list.specificordering',  $orderStatus, $orderStatus->virtuemart_orderstate_id, $qry);
             $ordering = JHTML::_('list.ordering', 'ordering', $qry, '', $orderStatus->ordering, 0);
             $this->assignRef('ordering', $ordering);
         }
         $lists['vmCoreStatusCode'] = $model->getVMCoreStatusCode();
         // Vendor selection
         $vendor_model = VmModel::getModel('vendor');
         $vendor_list = $vendor_model->getVendors();
         $lists['vendors'] = JHTML::_('select.genericlist', $vendor_list, 'virtuemart_vendor_id', '', 'virtuemart_vendor_id', 'vendor_name', $orderStatus->virtuemart_vendor_id);
         $this->assignRef('orderStatus', $orderStatus);
         $this->assignRef('lists', $lists);
         $this->addStandardEditViewCommands();
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle();
             $this->addStandardDefaultViewCommands();
         }
         $this->addStandardDefaultViewLists($model);
         $this->lists['vmCoreStatusCode'] = $model->getVMCoreStatusCode();
         $this->orderStatusList = $model->getOrderStatusList();
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
Example #29
0
 /**
  * Collect all data to show on the template
  *
  * @author RolandD, Max Milbers
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $session = JFactory::getSession();
     $virtuemart_price_id = $session->get('virtuemart_price_id', 0);
     $booking_date = $input->getString('booking_date', '');
     $privategrouptrip_model = tmsModel::getModel('privategrouptrip');
     $item_private_group_trip = $privategrouptrip_model->getData($virtuemart_price_id);
     $virtuemart_product_id = $item_private_group_trip->virtuemart_product_id;
     $input->set('virtuemart_product_id', $virtuemart_product_id);
     $privategrouptrip_model->setState('filter.virtuemart_price_id', $virtuemart_price_id);
     $this->privategrouptrip = reset($privategrouptrip_model->getItems());
     $this->privategrouptrip->allow_passenger = 'infant,child_1,child_2,teen,adult,senior';
     $this->privategrouptrip->departure_date = $booking_date;
     $product_model = tmsModel::getModel('product');
     $this->product = $product_model->getItem($this->privategrouptrip->virtuemart_product_id);
     require_once JPATH_ROOT . '/components/com_virtuemart/helpers/vmjointgroup.php';
     $this->rooming_select_type = Vmjointgroup::get_list_rooming_type();
     require_once JPATH_ROOT . '/libraries/php-loremipsum-master/src/LoremIpsum.php';
     $this->lipsum = new joshtronic\LoremIpsum();
     require_once JPATH_ROOT . '/administrator/components/com_virtuemart/helpers/tsmtransferaddon.php';
     $transfer_addon_model = tmsModel::getModel('transferaddon');
     require_once JPATH_ROOT . '/libraries/upgradephp-19/upgrade.php';
     $this->pre_transfer_item = $transfer_addon_model->getItem(12);
     $this->pre_transfer_item->data_price = base64_decode($this->pre_transfer_item->data_price);
     $this->pre_transfer_item->data_price = up_json_decode($this->pre_transfer_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->pre_transfer_item->sale_price = $this->pre_transfer_item->data_price->item_flat->net_price;
     $this->post_transfer_item = clone $transfer_addon_model->getItem(14);
     $this->post_transfer_item->data_price = base64_decode($this->post_transfer_item->data_price);
     $this->post_transfer_item->data_price = up_json_decode($this->post_transfer_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->post_transfer_item->asale_price = $this->post_transfer_item->data_price->item_flat->net_price;
     $hotel_addon_model = tmsModel::getModel('hoteladdon');
     require_once JPATH_ROOT . '/libraries/upgradephp-19/upgrade.php';
     $this->pre_night_item = $hotel_addon_model->getItem(14);
     $this->pre_night_item->data_price = base64_decode($this->pre_night_item->data_price);
     $this->pre_night_item->data_price = up_json_decode($this->pre_night_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->pre_night_item->sale_price = $this->pre_night_item->data_price->item_flat->net_price;
     $this->post_night_item = clone $hotel_addon_model->getItem(15);
     $this->post_night_item->data_price = base64_decode($this->post_night_item->data_price);
     $this->post_night_item->data_price = up_json_decode($this->post_night_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->post_night_item->asale_price = $this->post_transfer_item->data_price->item_flat->net_price;
     $transfer_excursion_addon = tmsModel::getModel('excursionaddon');
     $this->list_excursion_addon = $transfer_excursion_addon->getItemList();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
     // Load the helper(s)
     $this->loadHelper('html');
     $layoutName = JRequest::getWord('layout');
     $model = VmModel::getModel();
     // The list of fields which can't be toggled
     //$lists['coreFields']= array( 'name','username', 'email', 'password', 'password2' );
     $lists['coreFields'] = $model->getCoreFields();
     $this->addStandardDefaultViewLists($model, 'ordering', 'ASC');
     $this->userfieldsList = $model->getUserfieldsList();
     $this->pagination = $model->getPagination();
     $this->lists['coreFields'] = $lists['coreFields'];
     parent::display('results');
     echo $this->AjaxScripts();
 }