Post by yest » Thu Sep 02, 2010 3:02 am

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

New member

Posts

Joined
Thu Aug 05, 2010 1:57 am

Post by kedgetech » Thu Sep 02, 2010 10:53 am

You can verify if there is a problem with language classes of address. Its a place to start atleast. I am guessing you are missing a class or something.

User avatar
Active Member

Posts

Joined
Mon Mar 22, 2010 5:20 pm
Location - USA, Australia, India

Post by yest » Thu Sep 02, 2010 6:50 pm

i chaked it all. there is no problem with lan classes...

New member

Posts

Joined
Thu Aug 05, 2010 1:57 am

Post by kedgetech » Thu Sep 02, 2010 8:58 pm

PM me your details(sales@kedgegroup.com) . I will have a look at it tomo.

User avatar
Active Member

Posts

Joined
Mon Mar 22, 2010 5:20 pm
Location - USA, Australia, India

Post by Qphoria » Thu Sep 02, 2010 10:19 pm

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
I keep hearing about this but can never reproduce it. What are the exact steps to reproduce this?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ziomiki » Fri Oct 01, 2010 12:35 am

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.

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

Newbie

Posts

Joined
Fri Oct 01, 2010 12:12 am

Post by Qphoria » Fri Oct 01, 2010 9:24 am

This is an issue that I've seen too.. not sure why it isn't mapping the default address. so that is one bug
and the other bug would be clicking next without choosing the radio button gives the errors. I'm looking at it

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ziomiki » Fri Oct 01, 2010 10:07 pm

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.

Newbie

Posts

Joined
Fri Oct 01, 2010 12:12 am

Post by alltrade » Mon Oct 04, 2010 1:54 pm

I'm having the same issue. Was this ever solved?

Newbie

Posts

Joined
Sat Oct 02, 2010 6:19 am

Post by tonychen » Mon Oct 04, 2010 2:11 pm

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

Newbie

Posts

Joined
Mon Oct 04, 2010 2:00 pm

Post by ziomiki » Tue Oct 05, 2010 11:36 pm

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!

Newbie

Posts

Joined
Fri Oct 01, 2010 12:12 am

Post by Qphoria » Wed Oct 06, 2010 1:56 am

Good find tonychen... and unfortunately this one is a pain to fix. I'll post up a solution when I figure one out

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by tonychen » Thu Oct 07, 2010 10:06 am

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.

Newbie

Posts

Joined
Mon Oct 04, 2010 2:00 pm

Post by yest » Mon Oct 11, 2010 12:46 am

It does not work ... I did a test and it does not matter how many addresses have a customer ... It does not work even when one address ..

New member

Posts

Joined
Thu Aug 05, 2010 1:57 am

Post by yiyinlah » Thu Apr 21, 2011 7:16 am

Did somebody solve it??
I'm using 1.4.9.4.

I have the same errors, don't know what to do :(

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by Qphoria » Thu Apr 21, 2011 8:04 am

This was fixed back in 1.4.9.1

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yiyinlah » Thu Apr 21, 2011 8:08 am

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'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by Qphoria » Thu Apr 21, 2011 8:15 am

You sure its the same error? Undefined index is a generic term for many errors. the actual error here is:

Notice: Undefined index: firstname

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yiyinlah » Thu Apr 21, 2011 8:37 am

This is the error I'm getting.

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
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 using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore
Who is online

Users browsing this forum: Semrush [Bot] and 13 guests