Post by Hat » Sat Oct 22, 2011 11:19 am

Just popped up with random errors after working just fine and I didnt touch anything.

2011-10-22 3:15:27 - PHP Notice: Undefined index: country_id in /home/rhoppern/public_html/store/system/library/tax.php on line 17
2011-10-22 3:15:27 - PHP Notice: Undefined index: zone_id in /home/rhoppern/public_html/store/system/library/tax.php on line 17
2011-10-22 3:15:27 - PHP Notice: Undefined index: country_id in /home/rhoppern/public_html/store/system/library/tax.php on line 31
2011-10-22 3:15:27 - PHP Notice: Undefined index: zone_id in /home/rhoppern/public_html/store/system/library/tax.php on line 31


help!
Last edited by i2Paq on Wed Nov 09, 2011 7:39 pm, edited 1 time in total.
Reason: Title adjusted

Hat
Newbie

Posts

Joined
Sat Oct 22, 2011 11:18 am

Post by Qphoria » Sat Oct 22, 2011 10:24 pm

I saw this once before. It happens when the address doesn't have a zone or country selected as part of the registration... or so I thought. Another person saw this and then made a new account so it went away.. but I'm not sure how it happens to begin with.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by solarpenguin » Wed Nov 09, 2011 11:37 am

I had the same issue. For me it was customers that upgraded from 1.5.1.2 to 1.5.1.3. Once the user deleted their old address and added a new one, the messages went away.

Perhaps there is a way to default the zone and/or country unless there is a non-null zone / country on the customer record?

Newbie

Posts

Joined
Sun Sep 25, 2011 10:37 pm

Post by i2Paq » Wed Nov 09, 2011 2:29 pm

It has ALL to do with no address of a not complete address used by that customer. In most cases a account created form the Admin.

This is solved in the SVN, but that is an unfinished 1.5.2.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Xsecrets » Wed Nov 09, 2011 3:05 pm

no the second poster is correct it has to do with upgrade. I just ran into this too. From what I can tell the upgrade script does not handle users that are not in the default group properly and their default addresses do not get set properly.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Wed Nov 09, 2011 8:42 pm

Well, the upgrade script was designed more for table changes. I didn't spend time on data transplacement for relational tables in this case. But I guess with the new tax_rate_to_customer_group I need to put an entry in..

But I think if after upgrade you go to System->Localisation->Tax Class and update the data there, it will fix this issue.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by quepassa » Fri Nov 11, 2011 5:44 pm

Hi

I am also having this problem. I have looked at Tax classes and made the changes but still have the same problem. Not only am I getting the error but when someone checks out they cannot go past step 2 in the check out process. The minute they check their address and set it to default then there is no problem.

Has anyone got a solution to this.

Newbie

Posts

Joined
Fri Nov 05, 2010 7:29 pm

Post by Xsecrets » Fri Nov 11, 2011 9:24 pm

Qphoria wrote:Well, the upgrade script was designed more for table changes. I didn't spend time on data transplacement for relational tables in this case. But I guess with the new tax_rate_to_customer_group I need to put an entry in..

But I think if after upgrade you go to System->Localisation->Tax Class and update the data there, it will fix this issue.
I think the problem is more bigger than that. I actually fixed in in the database. The address_id field in the customer table was just completely wrong for the users that were in groups. Luckily on this store there were only a few users so it was pretty easy to spot and fix.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by jimaras » Mon Nov 14, 2011 5:37 am

Code: Select all

Notice: Undefined index: country_id in /usr/www/users/hobbyfy/e-kreopoleio.com/system/library/tax.php on line 17Notice: Undefined index: zone_id in /usr/www/users/hobbyfy/e-kreopoleio.com/system/library/tax.php on line 17Notice: Undefined index: country_id in /usr/www/users/hobbyfy/e-kreopoleio.com/system/library/tax.php on line 31Notice: Undefined index: zone_id in /usr/www/users/hobbyfy/e-kreopoleio.com/system/library/tax.php on line 31
This happened when i delete a customer.
Customer had made an order.

Is any solution?

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by maksfeltrin » Sat Nov 19, 2011 9:48 pm

The system/library Tax class assumes that if session has shipping_address_id and payment_address_id set, then querying their address records will give you a valid result.

If you delete a customer in the admin app, and you are logged as the same customer in the catalog app then those errors will happen when browsing the catalog app.

You just need to rewrite some rules in the Tax class constructor, making sure valid records are retrieved from the database.

Newbie

Posts

Joined
Wed Nov 16, 2011 9:06 am

Post by pramathesh » Sun Nov 20, 2011 4:42 pm

I have newly installed v 1.5.1.3 and I get this error.

I get this error specifically in Google Chrome.

It comes with Undefined index: zone_id in tax.php error on the same line. Also, it does not show at the start but it shows after the user tries to checkout. and the error is being displayed redundantly in the subsequent browsing in all the pages.

Newbie

Posts

Joined
Sun Nov 20, 2011 4:33 pm

Post by i2Paq » Sun Nov 20, 2011 5:42 pm

pramathesh wrote:I have newly installed v 1.5.1.3 and I get this error.

I get this error specifically in Google Chrome.

It comes with Undefined index: zone_id in tax.php error on the same line. Also, it does not show at the start but it shows after the user tries to checkout. and the error is being displayed redundantly in the subsequent browsing in all the pages.
Did you actually read all the replies in this topic?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by pramathesh » Mon Nov 21, 2011 1:17 am

i2Paq wrote:
pramathesh wrote:I have newly installed v 1.5.1.3 and I get this error.

I get this error specifically in Google Chrome.

It comes with Undefined index: zone_id in tax.php error on the same line. Also, it does not show at the start but it shows after the user tries to checkout. and the error is being displayed redundantly in the subsequent browsing in all the pages.
Did you actually read all the replies in this topic?
Sorry to say but I really could not get any perfect solution after reading the replies.

Newbie

Posts

Joined
Sun Nov 20, 2011 4:33 pm

Post by Brett888 » Tue Nov 29, 2011 8:13 pm

Hi all I was getting this also, hope this helps those with this problem:

2011-11-29 11:53:41 - PHP Notice: Undefined index: country_id in /home/yoursite/public_html/home/yoursite/public_html/system/library/tax.php on line 17
2011-11-29 11:53:41 - PHP Notice: Undefined index: zone_id in /home/yoursite/public_html/home/yoursite/public_html/system/library/tax.php on line 17
2011-11-29 11:53:41 - PHP Notice: Undefined index: country_id in /home/yoursite/public_html/home/yoursite/public_html/system/library/tax.php on line 31
2011-11-29 11:53:41 - PHP Notice: Undefined index: zone_id in /home/yoursite/public_html/home/yoursite/public_html/system/library/tax.php on line 31

I even did a reinstall and got the above on a refreshed version, the cause of the problem appears to be deletion of customer file account while logged on as customer (I did a test account with myself, and I believe others do this).

To get back to normal you have to input data back into your own Zones, Geo Zones, and Taxes. Then add new account on opencart website and put in same details of yourself, if other try new. This work for me, back to normal now.

Newbie

Posts

Joined
Mon Oct 24, 2011 9:58 pm

Post by pramathesh » Sun Dec 04, 2011 3:13 pm

I get this when I Install EBS payment module.

Newbie

Posts

Joined
Sun Nov 20, 2011 4:33 pm

Post by Gilmore » Thu Dec 15, 2011 9:47 am

I think I found the problem! When you login in to your account and if the user was made in the admin, then you won't have any Address information. So the cart won't have any clue as to what Country you are from with no Address information.

I have already slapped myself a couple of times :crazy: for not adding the Customer Address when manually entering one! So I Manually added an address to the user that was logged on when it threw this error and the error went away!

I think the simple solution would simply be to force even the Admin to enter the Full User info. Name, Address, City, Stat, Postal zone, Country, etc... and not just the simple form of Name, email, phone, pass, newsletter, etc... Make the Admin one just like the Register one does. All on one page with the Address. And of course add in the rest of the Admin features to it.

The Manual entry on the Admin doesn't force you to enter the address and since all of us seem to forget when Manually entering a Customer, we have to actually click the Address + under the General link.

Now really, isn't the Address part of the General information? ;D

Cheers!

Gil

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by straightlight » Thu Dec 15, 2011 12:15 pm

Now really, isn't the Address part of the General information?
<< Removed >>
Last edited by straightlight on Thu Dec 15, 2011 1:05 pm, edited 1 time in total.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Gilmore » Thu Dec 15, 2011 1:02 pm

Nope! I tried your mod and it broke the whole cart! Still seems like mine is the easier fix for now!

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by straightlight » Thu Dec 15, 2011 1:06 pm

It doesn't really explain the whole details when stating: 'broke the whole cart' while mine didn't had any problems after running this but since this is about contribution issues, I removed the above instructions.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Gilmore » Thu Dec 15, 2011 1:14 pm

This is on a fresh install of OC v1.5.1.3 There is no contributions on here other than the Cart. When I say broke the cart, that is exactly what I meant! You try to access the cart and it displays a blank page after trying your solution. There was nothing more to say since there were no errors in the error log. If there had been I would have gladly posted them to help you find the problem with it. So if you could be more specific on the contribution you are speaking of, it would be helpful. I have not mentioned anything about adding contributions, so you have me at a loss.

In system/library/tax.php I located:

Code: Select all

$this->setShippingAddress($address_query->row['country_id'], $address_query->row['zone_id']);
and replaced it as you said with:

Code: Select all

$this->setShippingAddress((isset($address_query->row['country_id']) ? $address_query->row['country_id'] : 0), (isset($address_query->row['zone_id']) ? $address_query->row['zone_id'] : 0);
In 2 locations. Lines 17 & 23

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am
Who is online

Users browsing this forum: No registered users and 46 guests