コード例 #1
0
ファイル: view.html.php プロジェクト: jeprodev/jeproshop
 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);
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: jeprodev/jeproshop
 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);
 }
コード例 #3
0
ファイル: country.php プロジェクト: jeprodev/jeproshop
 public function save_zone()
 {
     if ($this->viewAccess() && JeproshopTools::checkCountryToken()) {
         if ($this->has_errors) {
             return false;
         }
         $zoneModel = new JeproshopZoneModelZone();
         $zoneModel->saveZone();
     }
 }
コード例 #4
0
ファイル: view.html.php プロジェクト: jeprodev/jeproshop
 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);
 }
コード例 #5
0
ファイル: view.html.php プロジェクト: jeprodev/jeproshop
 public function viewZones($tpl = null)
 {
     $zoneModel = new JeproshopZoneModelZone();
     $this->zones = $zoneModel->getZoneList();
     $this->addToolBar();
     $this->sideBar = JHtmlSidebar::render();
     parent::display($tpl);
 }