public function renderEditForm($tpl = null) { $helper = new JeproshopHelper(); $this->assignRef('helper', $helper); $tax_rules_groups = JeproshopTaxRulesGroupModelTaxRulesGroup::getTaxRulesGroups(true); $this->assignRef('tax_rules_groups', $tax_rules_groups); $carrier_logo = JeproshopTools::isLoadedObject($this->carrier, 'carrier_id') && file_exists(COM_JEPROSHOP_CARRIER_IMAGE_DIR . $this->carrier->carrier_id . '.jpg') ? COM_JEPROSHOP_CARRIER_IMAGE_DIR . $this->carrier->carrier_id . '.jpg' : false; $this->assignRef('carrier_logo', $carrier_logo); $groups = JeproshopGroupModelGroup::getGroups(JeproshopContext::getContext()->language->lang_id); $this->assignRef('groups', $groups); $zones = JeproshopZoneModelZone::getZones(); $this->assignRef('zones', $zones); $carrierZones = $this->carrier->getZones(); $carrier_zones_ids = array(); if (is_array($carrierZones)) { foreach ($carrierZones as $carrier_zone) { $carrier_zones_ids[] = $carrier_zone->zone_id; } } $this->assignRef('selected_zones', $carrier_zones_ids); if ($this->getLayout() != 'modal') { $this->addToolBar(); $this->sideBar = JHtmlSidebar::render(); } parent::display($tpl); }
public function renderDetails($tpl = NULL) { $currencyModel = new JeproshopCurrencyModelCurrency(); $currencies = $currencyModel->getCurrenciesList(); $zones = JeproshopZoneModelZone::getZones(); $this->assignRef('currencies', $currencies); /*$this->assignRef('zones', $zones); */ //$this->pagination = $countryModel->getPagination(); if ($this->getLayout() != 'modal') { $this->addToolBar(); $this->sideBar = JHtmlSidebar::render(); } parent::display($tpl); }
private function assignCountries() { // Select the most appropriate country $app = JFactory::getApplication(); $country_id = $app->input->get('country_id'); if (isset($country_id) && is_numeric($country_id)) { $selectedCountry = (int) $country_id; } if (!isset($selectedCountry)) { $selectedCountry = (int) JeproshopSettingModelSetting::getValue('default_country'); } if (JeproshopSettingModelSetting::getValue('restrict_delivered_countries')) { $countries = JeproshopCarrierModelCarrier::getDeliveredCountries($this->context->language->lang_id, true, true); print_r($countries); } else { $countries = JeproshopCountryModelCountry::getCountries($this->context->language->lang_id, true); } $zones = JeproshopZoneModelZone::getZones(); $this->assignRef('zones', $zones); $this->assignRef('countries', $countries); $registrationProcessType = JeproshopSettingModelSetting::getValue('registration_process_type'); $this->assignRef('registration_process_type', $registrationProcessType); $selectedCountry = isset($selectedCountry) ? $selectedCountry : 0; $this->assignRef('selected_country', $selectedCountry); $vatNumberManagement = JeproshopSettingModelSetting::getValue('vat_number_management'); $this->assignRef('vat_management', $vatNumberManagement); }
public function renderAddState($tpl = null) { if (!isset($this->context)) { $this->context = JeproshopContext::getContext(); } $this->helper = new JeproshopHelper(); $countries = JeproshopCountryModelCountry::getStaticCountries($this->context->language->lang_id); $zones = JeproshopZoneModelZone::getZones(); $this->assignRef('countries', $countries); $this->assignRef('zones', $zones); $this->addToolBar(); $this->sideBar = JHtmlSidebar::render(); parent::display($tpl); }