SetViewTitle(); $model = VmModel::getModel(); $this->state = $model->getSingleState(); $this->virtuemart_country_id = vRequest::getInt('virtuemart_country_id', $this->state->virtuemart_country_id); $isNew = (count($this->state) < 1); if(empty($countryId) && $isNew){ vmWarn('Country id is 0'); return false; } $country = VmModel::getModel('country'); $country->setId($this->virtuemart_country_id); $this->country_name = $country->getData()->country_name; $layoutName = vRequest::getCmd('layout', 'default'); if ($layoutName == 'edit') { $zoneModel = VmModel::getModel('Worldzones'); $this->worldZones = $zoneModel->getWorldZonesSelectList(); $this->addStandardEditViewCommands(); } else { $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $this->states = $model->getStates($this->virtuemart_country_id); $this->pagination = $model->getPagination(); } parent::display($tpl); } } // pure php no closing tag