post['postcode'])) { $this->data['postcode'] = $this->request->post['postcode']; } elseif (!empty($address_info)) { $this->data['postcode'] = $address_info['postcode']; } else { $this->data['postcode'] = ''; } if (isset($this->request->post['city'])) { $this->data['city'] = $this->request->post['city']; } elseif (!empty($address_info)) { $this->data['city'] = $address_info['city']; } else { $this->data['city'] = ''; } if (isset($this->request->post['country_id'])) { $this->data['country_id'] = $this->request->post['country_id']; } elseif (!empty($address_info)) { $this->data['country_id'] = $address_info['country_id']; } else { $this->data['country_id'] = $this->config->get('config_country_id'); } if (isset($this->request->post['zone_id'])) { $this->data['zone_id'] = $this->request->post['zone_id']; } elseif (!empty($address_info)) { $this->data['zone_id'] = $address_info['zone_id']; } else { $this->data['zone_id'] = ''; } $this->load->model('localisation/country'); $this->data['countries'] = $this->model_localisation_country->getCountries(); if (isset($this->request->post['default'])) { $this->data['default'] = $this->request->post['default']; } elseif (isset($this->request->get['address_id'])) { $this->data['default'] = $this->customer->getAddressId() == $this->request->get['address_id']; } else { $this->data['default'] = false; } $this->data['back'] = $this->url->link('account/address', '', 'SSL'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/address_form.tpl')) { $this->template = $this->config->get('config_template') . '/template/account/address_form.tpl'; } else { $this->template = 'default/template/account/address_form.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this->response->setOutput($this->render()); } private function validateForm() { if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen($this->request->post['firstname']) > 32)) { $this->error['firstname'] = $this->language->get('error_firstname'); } if ((utf8_strlen($this->request->post['lastname']) < 1) || (utf8_strlen($this->request->post['lastname']) > 32)) { $this->error['lastname'] = $this->language->get('error_lastname'); } if ((utf8_strlen($this->request->post['address_1']) < 3) || (utf8_strlen($this->request->post['address_1']) > 128)) { $this->error['address_1'] = $this->language->get('error_address_1'); } if ((utf8_strlen($this->request->post['city']) < 2) || (utf8_strlen($this->request->post['city']) > 128)) { $this->error['city'] = $this->language->get('error_city'); } $this->load->model('localisation/country'); $country_info = $this->model_localisation_country->getCountry($this->request->post['country_id']); if ($country_info) { if ($country_info['postcode_required'] && (utf8_strlen($this->request->post['postcode']) < 2) || (utf8_strlen($this->request->post['postcode']) > 10)) { $this->error['postcode'] = $this->language->get('error_postcode'); } // VAT Validation $this->load->helper('vat'); if ($this->config->get('config_vat') && $this->request->post['tax_id'] && (vat_validation($country_info['iso_code_2'], $this->request->post['tax_id']) != 'invalid')) { $this->error['tax_id'] = $this->language->get('error_vat'); } } if ($this->request->post['country_id'] == '') { $this->error['country'] = $this->language->get('error_country'); } if ($this->request->post['zone_id'] == '') { $this->error['zone'] = $this->language->get('error_zone'); } if (!$this->error) { return true; } else { return false; } } private function validateDelete() { if ($this->model_account_address->getTotalAddresses()) { $this->error['warning'] = $this->language->get('error_delete'); } if ($this->customer->getAddressId() == $this->request->get['address_id']) { $this->error['warning'] = $this->language->get('error_default'); } if (!$this->error) { return true; } else { return false; } } public function country() { $json = array(); $this->load->model('localisation/country'); $country_info = $this->model_localisation_country->getCountry($this->request->get['country_id']); if ($country_info) { $this->load->model('localisation/zone'); $json = array( 'country_id' => $country_info['country_id'], 'name' => $country_info['name'], 'iso_code_2' => $country_info['iso_code_2'], 'iso_code_3' => $country_info['iso_code_3'], 'address_format' => $country_info['address_format'], 'postcode_required' => $country_info['postcode_required'], 'zone' => $this->model_localisation_zone->getZonesByCountryId($this->request->get['country_id']), 'status' => $country_info['status'] ); } $this->response->setOutput(json_encode($json)); } } ?>Warning: Cannot modify header information - headers already sent by (output started at /home/vannucci/public_html/shop/catalog/controller/account/address.php:742) in /home/vannucci/public_html/shop/vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/vannucci/public_html/shop/catalog/controller/account/address.php:742) in /home/vannucci/public_html/shop/vqmod/vqcache/vq2-system_engine_controller.php on line 29