When the customer did not sign the shipping address the product instead of checking the problem suddenly appeared at the top of the page the following instruction:
Notice: Undefined index: firstname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 313Notice: Undefined index: lastname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 317Notice: Undefined index: address_1 in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 321Notice: Undefined index: city in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 325Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 331Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 339Notice: Undefined index: zone_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 343
Notice: Undefined index: firstname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 313Notice: Undefined index: lastname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 317Notice: Undefined index: address_1 in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 321Notice: Undefined index: city in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 325Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 331Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 339Notice: Undefined index: zone_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 343
I keep hearing about this but can never reproduce it. What are the exact steps to reproduce this?yest wrote:When the customer did not sign the shipping address the product instead of checking the problem suddenly appeared at the top of the page the following instruction:
Notice: Undefined index: firstname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 313Notice: Undefined index: lastname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 317Notice: Undefined index: address_1 in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 321Notice: Undefined index: city in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 325Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 331Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 339Notice: Undefined index: zone_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 343
Same problem.yest wrote:When the customer did not sign the shipping address the product instead of checking the problem suddenly appeared at the top of the page the following instruction:
Notice: Undefined index: firstname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 313Notice: Undefined index: lastname in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 317Notice: Undefined index: address_1 in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 321Notice: Undefined index: city in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 325Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 331Notice: Undefined index: country_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 339Notice: Undefined index: zone_id in /home/wpstore/public_html/catalog/controller/checkout/address.php on line 343
1: register a new customer, go to home page.
2:I choose a product and put it in the cart, then i go to checkout and OC asks me to choose the existing address (written during registration) or specify a new address for the shipping. In this page, if i don't select the existing address and i don't compile the new fields and the press the button "continue" (related of existing address) the problem appear. the page is: index.php?route=checkout/address/shipping.
The problem is caused because none of the addresses entered by the customer during the registration or insereted in the profile is selected ad default choiche. A simple way is select the first address.
Any solution?
Thanks!
OC 1.4.9.1
update: i have seen that the problem is caused because the address is not stored as default address, but if i select one of the addresses, put the option box in YES as default and save; when i go back see the option....it is setted in NO.
i think there's a problem with the funcition that store the addresses and relative options.
With a new plain vanilla local installation there are no problem with address index after 2h testing.
i think there's a problem with the funcition that store the addresses and relative options.
With a new plain vanilla local installation there are no problem with address index after 2h testing.
Forgive my English...
I know where is the problem is.
The problem happens when You update the customer address list in the backend.
The update deleted the address list and then insert the data, thus the address_id in the address table changed(auto increment), but the address_id in the customer table did NOT change to the new address_id in the address table as it should.
I hope You can understand my explanation, and hope some one can fix the bug...
Thanks,
Tony Chen
I know where is the problem is.
The problem happens when You update the customer address list in the backend.
The update deleted the address list and then insert the data, thus the address_id in the address table changed(auto increment), but the address_id in the customer table did NOT change to the new address_id in the address table as it should.
I hope You can understand my explanation, and hope some one can fix the bug...
Thanks,
Tony Chen
good kill tonychen!!!
The address id don't change in the customer table...so, for now, we can manually modify the id in DB because this problem there is only in the backend. The administrator know the details of the customer that need some mod, so he can find the id of new address in the address table and put it in the customer table.
Thanks! And hope in a quickly fix!
The address id don't change in the customer table...so, for now, we can manually modify the id in DB because this problem there is only in the backend. The administrator know the details of the customer that need some mod, so he can find the id of new address in the address table and put it in the customer table.
Thanks! And hope in a quickly fix!
I have a quick solution for this problem...
It is not perfect , but it solve the problem anyway(you won't get customer calling for service).
Solution:
in "admin/model/sale/customer.php"
1. find
public function editCustomer($customer_id, $data) {
$this->db->query("UPDATE " . DB_PREFIX . "customer SET firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', cellphone = '" . $this->db->escape($data['cellphone']) . "', fax = '" . $this->db->escape($data['fax']) . "', newsletter = '" . (int)$data['newsletter'] . "', customer_group_id = '" . (int)$data['customer_group_id'] . "', status = '" . (int)$data['status'] . "' WHERE customer_id = '" . (int)$customer_id . "'");
if ($data['password']) {
$this->db->query("UPDATE " . DB_PREFIX . "customer SET password = '" . $this->db->escape(md5($data['password'])) . "' WHERE customer_id = '" . (int)$customer_id . "'");
}
$this->db->query("DELETE FROM " . DB_PREFIX . "address WHERE customer_id = '" . (int)$customer_id . "'");
if (isset($data['addresses'])) {
foreach ($data['addresses'] as $address) {
$this->db->query("INSERT INTO " . DB_PREFIX . "address SET customer_id = '" . (int)$customer_id . "', firstname = '" . $this->db->escape($address['firstname']) . "', lastname = '" . $this->db->escape($address['lastname']) . "', company = '" . $this->db->escape($address['company']) . "', taxid = '" . $this->db->escape($address['taxid']) . "', address_1 = '" . $this->db->escape($address['address_1']) . "', address_2 = '" . $this->db->escape($address['address_2']) . "', city = '" . $this->db->escape($address['city']) . "', postcode = '" . $this->db->escape($address['postcode']) . "', country_id = '" . (int)$address['country_id'] . "', zone_id = '" . (int)$address['zone_id'] . "'");
}
}
2. add the following lines right after:
//
$address_id = $this->db->getLastId();
$this->db->query("UPDATE " . DB_PREFIX . "customer SET address_id = '" . (int)$address_id . "' WHERE customer_id = '" . (int)$customer_id . "'");
//
}
That's it.
When the customer has only one shipping address, there is no problem with it.
When the customer has more than one shipping address, and you might change his default shipping address after you update his customer info in the backend. But I think this is a minor problem, at least he has a chance to choose the right shipping address while he is doing chekout. Anyway, the checkout process will be going smoothly, Right?
I am still waiting that Qphoria can give us a perfect solution for this problem.
It is not perfect , but it solve the problem anyway(you won't get customer calling for service).
Solution:
in "admin/model/sale/customer.php"
1. find
public function editCustomer($customer_id, $data) {
$this->db->query("UPDATE " . DB_PREFIX . "customer SET firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', cellphone = '" . $this->db->escape($data['cellphone']) . "', fax = '" . $this->db->escape($data['fax']) . "', newsletter = '" . (int)$data['newsletter'] . "', customer_group_id = '" . (int)$data['customer_group_id'] . "', status = '" . (int)$data['status'] . "' WHERE customer_id = '" . (int)$customer_id . "'");
if ($data['password']) {
$this->db->query("UPDATE " . DB_PREFIX . "customer SET password = '" . $this->db->escape(md5($data['password'])) . "' WHERE customer_id = '" . (int)$customer_id . "'");
}
$this->db->query("DELETE FROM " . DB_PREFIX . "address WHERE customer_id = '" . (int)$customer_id . "'");
if (isset($data['addresses'])) {
foreach ($data['addresses'] as $address) {
$this->db->query("INSERT INTO " . DB_PREFIX . "address SET customer_id = '" . (int)$customer_id . "', firstname = '" . $this->db->escape($address['firstname']) . "', lastname = '" . $this->db->escape($address['lastname']) . "', company = '" . $this->db->escape($address['company']) . "', taxid = '" . $this->db->escape($address['taxid']) . "', address_1 = '" . $this->db->escape($address['address_1']) . "', address_2 = '" . $this->db->escape($address['address_2']) . "', city = '" . $this->db->escape($address['city']) . "', postcode = '" . $this->db->escape($address['postcode']) . "', country_id = '" . (int)$address['country_id'] . "', zone_id = '" . (int)$address['zone_id'] . "'");
}
}
2. add the following lines right after:
//
$address_id = $this->db->getLastId();
$this->db->query("UPDATE " . DB_PREFIX . "customer SET address_id = '" . (int)$address_id . "' WHERE customer_id = '" . (int)$customer_id . "'");
//
}
That's it.
When the customer has only one shipping address, there is no problem with it.
When the customer has more than one shipping address, and you might change his default shipping address after you update his customer info in the backend. But I think this is a minor problem, at least he has a chance to choose the right shipping address while he is doing chekout. Anyway, the checkout process will be going smoothly, Right?
I am still waiting that Qphoria can give us a perfect solution for this problem.
But I just upgrade the cart to 1.4.9.4 yesterday, and I'm still in the midst of setting up my store, so I'm still testing out.
I received this error just few hours ago, what should I do?
I received this error just few hours ago, what should I do?

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.
This is the error I'm getting.
I'm 100% sure it's the same error.
This is my error message:
It happened when I was trying out Paypal, & click cancel & return to my store.
If I didn't remembered wrongly, cos I was playing around with OC.
I'm 100% sure it's the same error.
This is my error message:
Code: Select all
Notice: Undefined index: firstname in /home/username/public_html/catalog/controller/checkout/address.php on line 313Notice: Undefined index: lastname in /home/username/public_html/catalog/controller/checkout/address.php on line 317Notice: Undefined index: address_1 in /home/username/public_html/catalog/controller/checkout/address.php on line 321Notice: Undefined index: city in /home/username/public_html/catalog/controller/checkout/address.php on line 325Notice: Undefined index: country_id in /home/username/public_html/catalog/controller/checkout/address.php on line 331Notice: Undefined index: country_id in /home/username/public_html/catalog/controller/checkout/address.php on line 339Notice: Undefined index: zone_id in /home/username/public_html/catalog/controller/checkout/address.php on line 343
If I didn't remembered wrongly, cos I was playing around with OC.
I'm using Opencart 1.5.4.1 & vQmod 2.3.2.
Who is online
Users browsing this forum: Semrush [Bot] and 13 guests