/**
  * Assign template vars related to page content
  * @see FrontController::initContent()
  */
 public function initContent()
 {
     parent::initContent();
     if ($this->customer->birthday) {
         $birthday = explode('-', $this->customer->birthday);
     } else {
         $birthday = array('-', '-', '-');
     }
     /* Generate years, months and days */
     $this->context->smarty->assign(array('years' => Tools::dateYears(), 'sl_year' => $birthday[0], 'months' => Tools::dateMonths(), 'sl_month' => $birthday[1], 'days' => Tools::dateDays(), 'sl_day' => $birthday[2], 'errors' => $this->errors, 'genders' => Gender::getGenders()));
     if (Module::isInstalled('blocknewsletter')) {
         $this->context->smarty->assign('newsletter', (int) Module::getInstanceByName('blocknewsletter')->active);
     }
     // start of implementation of the module code - taxamo
     // Get selected country
     if (Tools::isSubmit('taxamoisocountryresidence') && !is_null(Tools::getValue('taxamoisocountryresidence'))) {
         $selected_country = Tools::getValue('taxamoisocountryresidence');
     } else {
         $selected_country = Taxamoeuvat::getCountryByCustomer($this->customer->id);
     }
     // Generate countries list
     if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) {
         $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
     } else {
         $countries = Country::getCountries($this->context->language->id, true);
     }
     /* todo use helper */
     $list = '<option value="">-</option>';
     foreach ($countries as $country) {
         $selected = $country['iso_code'] == $selected_country ? 'selected="selected"' : '';
         $list .= '<option value="' . $country['iso_code'] . '" ' . $selected . '>' . htmlentities($country['name'], ENT_COMPAT, 'UTF-8') . '</option>';
     }
     // Get selected cc prefix
     if (Tools::isSubmit('taxamoccprefix') && !is_null(Tools::getValue('taxamoccprefix'))) {
         $taxamo_cc_prefix = Tools::getValue('taxamoccprefix');
     } else {
         $taxamo_cc_prefix = Taxamoeuvat::getPrefixByCustomer($this->customer->id);
     }
     if ($this->customer->id) {
         $this->context->smarty->assign(array('countries_list' => $list, 'taxamoisocountryresidence' => $selected_country, 'taxamoccprefix' => $taxamo_cc_prefix));
     }
     // end of code implementation module - taxamo
     $this->setTemplate(_PS_THEME_DIR_ . 'identity.tpl');
 }