Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2009
    Posts
    21
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jul 2009
    Posts
    21
    Plugin Contributions
    0

    Default Re: 1054 Unknown column 'zen_order_id' in 'where clause'

    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?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jul 2009
    Posts
    21
    Plugin Contributions
    0

    Default 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.

  5. #5
    Join Date
    Jul 2009
    Posts
    21
    Plugin Contributions
    0

    Default 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.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

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

    Quote Originally Posted by lhardie View Post
    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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Canada Post module error
    By DJLQD in forum Addon Shipping Modules
    Replies: 1
    Last Post: 6 Aug 2010, 07:02 PM
  2. Canada Post Module XML Parsing Error
    By jhadur in forum Built-in Shipping and Payment Modules
    Replies: 25
    Last Post: 8 May 2009, 06:57 PM
  3. Error in Canada Post module in french
    By YesNoMaybe in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 25 Sep 2008, 07:27 PM
  4. 1054 Unknown column 'order_id' in 'where clause' using nochex payment module
    By PGlad in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 26 Mar 2008, 08:39 AM
  5. Canada post error 1054???
    By AutumnLisa in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 17 Dec 2006, 09:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg