Hello,
I've some problems with my site..
I'm running this site in Norway, and have made a lot of code change with country/tax zones..
My problem is that:
When new users register > in their profile default values are: Country: none - Region / State: none
Then taxes don't shop up correct, but if I manually edit their account to Norway/None its all correct.
How to fix this default values when they register?
I found this sql string in customer.php:
$this->db->query("INSERT INTO " . DB_PREFIX . "address SET customer_id = '" . (int)$customer_id . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', company = '" . $this->db->escape($data['company']) . "', address_1 = '" . $this->db->escape($data['address_1']) . "', address_2 = '" . $this->db->escape($data['address_2']) . "', city = '" . $this->db->escape($data['city']) . "', postcode = '" . $this->db->escape($data['postcode']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "'");
- Thanks in advance guys!
For example you could edit the last name in that query like this:
You don't need to use the ESCAPE function for a string you know is going in there manually. You can do that to any field you wish.
Code: Select all
lastname = 'RickenBocker' ,
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "address SET customer_id = '', firstname = '', lastname = '', company = '', '', address_2 ='', city = '', postcode = '', country_id = '', zone_id = ''");
Who is online
Users browsing this forum: No registered users and 23 guests