Zen Cart Logo
Forums / Addon Shipping Modules / Error 1054 p.order_id : Canada Post Module?

Error 1054 p.order_id : Canada Post Module?

Locked

Views: 1,562

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
10 Jul 2009, 1:14 AM
#1
lhardie avatar

lhardie

New Zenner

Join Date:
Jul 2009
Posts:
21
Plugin Contributions:
0

Error 1054 p.order_id : Canada Post Module?

Hi everyone,

I have read through all the posts on 1054 errors that I felt were relevant and simply couldn't find help for this particular error.

I am currently using Zen Cart version 1.3.8a.

When I visit Admin>Customers>Paypal IPN I get the following error message:
"1054 Unknown column 'p.order_id' in 'on clause'
in:
[select count(*) as total from paypal as p left join orders as o on o.orders_id = p.order_id]"

I am pretty sure this error may be occuring because I use the Canada Post module which was made for an older version of Zen Cart (there seems to be no new release). I fixed a different error I was having (the 1054 error for zen.order_id) with success... but have run into this.

First, does anyone know if there is a newer version of the Canada Post Module? The one I have was made for Zen Cart 1.3.7

Second, does anyone know how I might fix this particular error? Is it simply a matter of renaming one of the columns in my paypal table?

Any help is appreciated! Let me know if I haven't included any pertinent information.
Laura

10 Jul 2009, 5:25 AM
#2
lhardie avatar

lhardie

New Zenner

Join Date:
Jul 2009
Posts:
21
Plugin Contributions:
0

Re: Error 1054 p.order_id : Canada Post Module?

I am running version 1.3.8a and I encountered the problem because I installed the Canada Post module. I believe it has old code in it that was made for version 1.3.7 and that is what caused the issues for me.

I made the changes in my database in the paypal table, renaming order_id to zen_order_id and it worked.

I'm having issues in other places though, so I'd really like to figure out if there are changes I can make that will fix this. I'm sure there are spots in the files from the Canada Post module that call the wrong field name etc.

Anyone have any experience with this or know enough to have a look and figure it out?

10 Jul 2009, 10:49 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Error 1054 p.order_id : Canada Post Module?

In the Free Addons area, the latest Canada Post module there is for v1.3.8. I don't know why you're installing a v1.3.7 version on a v1.3.8 site, but that'll be why you're getting the headaches you described.

10 Jul 2009, 6:20 PM
#4
lhardie avatar

lhardie

New Zenner

Join Date:
Jul 2009
Posts:
21
Plugin Contributions:
0

Re: Error 1054 p.order_id : Canada Post Module?

I had a look, and I am using the latest version of the Canada Post module. I only thought that it was an older version because they haven't updated the included readme and it warns that it's for version 1.3.7

SO.. I am using 1.3.8a of Zen Cart, and the most recent Canada Post module.

And yet I've been having issues with 1054 errors. The Canada Post module is the only thing I've added to Zen Cart, so I've assumed (but maybe incorrectly) that it's causing the issues.

23 Jul 2009, 7:43 PM
#5
lhardie avatar

lhardie

New Zenner

Join Date:
Jul 2009
Posts:
21
Plugin Contributions:
0

Re: Error 1054 p.order_id : Canada Post Module?

So does anyone know why I am getting this error when I visit the Paypal IPN section in the admin:

1054 Unknown column 'p.order_id' in 'on clause'
in:
[select count(*) as total from paypal as p left join orders as o on o.orders_id = p.order_id]

As I said above, I'm running version 1.3.8a of Zen Cart and the only module I've added is Canada Post.

23 Jul 2009, 8:11 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Error 1054 p.order_id : Canada Post Module?

My earlier reply was based on the subject of your post referring to the Canada Post module.

However, the PayPal IPN page which loads data from the "paypal" table in your database has nothing to do with Canada Post.

23 Jul 2009, 8:15 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Error 1054 p.order_id : Canada Post Module?

lhardie:

So does anyone know why I am getting this error when I visit the Paypal IPN section in the admin:

1054 Unknown column 'p.order_id' in 'on clause'
in:
[select count(*) as total from paypal as p left join orders as o on o.orders_id = p.order_id]

As I said above, I'm running version 1.3.8a of Zen Cart and the only module I've added is Canada Post.

That error shows that the program is looking for a field named "order_id" in the table named "paypal" in your database ... but isn't finding it.

In older (v1.3.7 and older) versions of Zen Cart, there was a field named "zen_order_id". However, since the "zen_" prefix clashed with the way people who wrote addons liked to do things, we decided to rename it to minimize some confusion. The rename from "zen_order_id" to "order_id" happened as part of the upgrade from v1.3.7 to v1.3.8, and also automatically happens if you edit your PayPal settings using the v1.3.8 paypal module.

Back to your situation ... I have no idea why your database doesn't have the right field name in it. The only logical reason for that would be that you actually have an old version of the database mixed with newer version of PHP code.