Results 1 to 7 of 7
  1. #1
    Join Date
    May 2005
    Location
    Pennsylvania
    Posts
    38
    Plugin Contributions
    1

    Default WARNING: An Error occurred, please refresh the page and try again.

    OK, I need some help, and I am not sure if this is the correct spot.
    I have upgraded to v1.5.

    I am doing a re-write for purchase orders, which is essential for my clients store.

    everything up to this point is working fine until i try to view the order in admin.

    I have traced my error to the order class in admin.

    I have successfully added a new column in zen_orders however under function query, when I insert the purchase_order_number. It just crashes the view/edit order.

    original
    Code:
        function query($order_id) {
          global $db;
          $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
                                        customers_suburb, customers_city, customers_postcode, customers_id,
                                        customers_state, customers_country, customers_telephone,
                                        customers_email_address, customers_address_format_id, delivery_name,
                                        delivery_company, delivery_street_address, delivery_suburb,
                                        delivery_city, delivery_postcode, delivery_state, delivery_country,
                                        delivery_address_format_id, billing_name, billing_company,
                                        billing_street_address, billing_suburb, billing_city, billing_postcode,
                                        billing_state, billing_country, billing_address_format_id,
                                        coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
                                        cc_type, cc_owner, cc_number, cc_expires, currency,
                                        currency_value, date_purchased, orders_status, last_modified,
                                        order_total, order_tax, ip_address
                                 from " . TABLE_ORDERS . "
                                 where orders_id = '" . (int)$order_id . "'");
    after i insert purchase order
    Code:
        function query($order_id) {
          global $db;
          $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
                                        customers_suburb, customers_city, customers_postcode, customers_id,
                                        customers_state, customers_country, customers_telephone,
                                        customers_email_address, customers_address_format_id, delivery_name,
                                        delivery_company, delivery_street_address, delivery_suburb,
                                        delivery_city, delivery_postcode, delivery_state, delivery_country,
                                        delivery_address_format_id, billing_name, billing_company,
                                        billing_street_address, billing_suburb, billing_city, billing_postcode,
                                        billing_state, billing_country, billing_address_format_id,
                                        coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
                                        cc_type, cc_owner, cc_number, cc_expires, currency,
                                        currency_value, date_purchased, orders_status, last_modified,
                                        order_total, order_tax, ip_address, purchase_order_number
                                 from " . TABLE_ORDERS . "
                                 where orders_id = '" . (int)$order_id . "'");
    i get "WARNING: An Error occurred, please refresh the page and try again." when I try to look at the order in admin.

    Help what am I doing wrong or missing.

    Thanks
    My modules: Purchase Order Basic
    Mike

  2. #2
    Join Date
    Jan 2004
    Posts
    60,709
    Blog Entries
    4
    Plugin Contributions
    149

    Default Re: Warning error ... I need your help

    Quote Originally Posted by l3ackdraft View Post
    "WARNING: An Error occurred, please refresh the page and try again."
    A search in the FAQs for your error message brings up this article: http://tutorials.zen-cart.com/index.php?article=412
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



  3. #3
    Join Date
    May 2005
    Location
    Pennsylvania
    Posts
    38
    Plugin Contributions
    1

    Default Re: WARNING: An Error occurred, please refresh the page and try again.

    Well let me ask you this Doc.
    Can you tell me or point me into a direction, where i can include the the purchase_order_number from the sql without "hacking" the orders.php class file.
    Is this even possible.
    My modules: Purchase Order Basic
    Mike

  4. #4
    Join Date
    Jan 2004
    Posts
    60,709
    Blog Entries
    4
    Plugin Contributions
    149

    Default Re: WARNING: An Error occurred, please refresh the page and try again.

    What's the actual SQL error message?

    You can't merely add a random field name to a query if that field doesn't exist in the table you're querying. So, if you're getting an SQL error that tells you a certain field doesn't exist, then ... well ... it doesn't exist. Maybe you've got a typo on the field name. Maybe you added the field to the wrong table or the wrong database. All kinds of things could be wrong with what you've done. Without the actual SQL error, it's just a guess.

    As for whether you need to hack the core code, that all depends on whether you need the functionality you're hacking into the code. Maybe you can live without it? If not, then unless there's a notifier hook in the code you'll need to alter the code. In v1.x there aren't many notifier hooks in the admin side, for technical reasons.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



  5. #5
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    400
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again.

    I just upgraded from v1.39g to 1.5 and I experienced the same problem.

    I did as DR recommended and checked the cache log files. It told me that there was no order_status file in DB. I updated the db sucessfully but for some reason order_status disappeared.

    I have updated 5 other sites and never experienced the probelm.

    I just copied the order_status file from a working v1.5 DB thru my control panel phpmyadmin.

    Check your cache log files, its probably something very similar.

  6. #6
    Join Date
    Mar 2007
    Location
    sunny Florida, USA
    Posts
    81
    Plugin Contributions
    0

    Have a Drink Re: WARNING: An Error occurred, please refresh the page and try again.

    Just an FYI for anyone having this issue, here's what happened to me and why.

    I was getting this error as well, after making a change to allow for PHP to run within EZ-Pages (private site, no security risks that are major - beware when doing this, however).

    The error, after viewing the log files in /cache turned out to be that the database I was referring to within my PHP code was a different one than Zen uses, and it was throwing an error from the query_factory.php file. So, I prefixed the tables from my foreign database and imported them to the database running Zen (different prefix so that anyone would know at a glance that they're not zen tables) and voila!, no more error displayed and all looks swell.

    The moral of the story is: this project (Zen) is simply wonderful. The community is helpful and if you are diligent and read everything about any problems which others experience which are at all *similar* to yours, you'll likely find the answer.

    Thank you Zen team...coffee's on me come payday.

    -R
    Last edited by BouncerFL; 29 Nov 2012 at 09:05 PM. Reason: added URL for reference
    ++++++++++++++++
    Subtle as the 'b' in subtle.

  7. #7
    Join Date
    Jun 2007
    Location
    Nashville, TN
    Posts
    32
    Plugin Contributions
    1

    Default Re: WARNING: An Error occurred, please refresh the page and try again.

    So that you can see the error more clearly, try this http://www.zen-cart.com/content.php?...rror_reporting


    It's a geek thing. If I had to explain it, you wouldn't understand.

 

 

Similar Threads

  1. Warning : an error has occured please refresh and try again.
    By eastboy in forum Upgrading from 1.3.x to 1.5.x
    Replies: 3
    Last Post: 8 Jan 2012, 07:31 PM
  2. Warning : an error has occured please refresh and try again.
    By hottrendz in forum Upgrading from 1.3.x to 1.5.x
    Replies: 3
    Last Post: 7 Jan 2012, 11:13 PM
  3. Authorize.net - An error occurred
    By swhiting in forum Built-in Shipping and Payment Modules
    Replies: 24
    Last Post: 7 Jul 2010, 04:48 AM
  4. Replies: 9
    Last Post: 30 Mar 2009, 06:50 AM
  5. Main page screwing up from refresh to refresh ...
    By Giftbox in forum General Questions
    Replies: 1
    Last Post: 20 Nov 2007, 12:33 AM

Bookmarks

Posting Permissions

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