Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  1. #1
    Join Date
    Jul 2015
    Location
    Allentown, PA
    Posts
    33
    Plugin Contributions
    0

    Default Host upgraded servers now customers can't complete an order

    Our store has been up and running with ZC for seven years, we've been through many upgrades, but this is the first time we have needed to post a question.
    Currently, customers can access the site, login to store, add items to the cart, go through the entire checkout process including applying coupons, but when they try to confirm the order..."WARNING: An Error occurred, please refresh the page and try again." Refreshing the page does nothing.
    The zen cart error logs show:
    Code:
    PHP Fatal error:  1364:Field 'account_name' doesn't have a default value :: INSERT INTO zen_orders (customers_id,... (as called by) /home/my_site/public_html/store/includes/functions/functions_general.php on line 965 <== in /home/my_site/public_html/store/includes/classes/db/mysql/query_factory.php on line 155
    My hosting company indicated that I needed to upgrade my version of ZC -- I was running 1.5.1 w/o issue. I upgraded to 1.5.4 through their Cpanel script installation page. After the upgrade -- same issue.
    When looking at "zen_orders" using PhpMyAdmin the "account_name" field is sometimes blank.
    I would appreciate any insights into how to solve my problem.
    Thank you.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,515
    Plugin Contributions
    88

    Default Re: Host upgraded servers now customers can't complete an order

    An "out-of-the-box" Zen Cart installation doesn't include an account_name field in the orders table. What plugins do you have installed?
    Last edited by lat9; 9 Jul 2015 at 07:11 PM. Reason: Correct sentence structure

  3. #3
    Join Date
    Jul 2015
    Location
    Allentown, PA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Host upgraded servers now customers can't complete an order

    Quote Originally Posted by lat9 View Post
    An "out-of-the-box" Zen Cart installation doesn't include an account_name field in the orders table. What plugins do you have installed?
    We have an image handler, payment (purchase order), and shipping (UPS & USPS).

  4. #4
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Host upgraded servers now customers can't complete an order

    A different way to look at it considering that the site has been upgraded over the years is what plugins have ever been installed?

    Guessing that at some point a plugin was not carried over to one of the upgrades and the new database server/software has a requirement that previously was a non-issue...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jul 2015
    Location
    Allentown, PA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Host upgraded servers now customers can't complete an order

    Quote Originally Posted by mc12345678 View Post
    A different way to look at it considering that the site has been upgraded over the years is what plugins have ever been installed?

    Guessing that at some point a plugin was not carried over to one of the upgrades and the new database server/software has a requirement that previously was a non-issue...
    Ok. So once I understand all the plugins that have ever been used on the site (I think the list was complete, but maybe not), what is the process for narrowing down and fixing the problem?
    Should I be looking for the plugin that created the "account_name" db field? Is that the key to my problem? Can I simply find the code for "account_name" and allow NULL as a value? If so, how would I go about that.
    Thanks for your help.

  6. #6
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Host upgraded servers now customers can't complete an order

    Quote Originally Posted by JG64 View Post
    Ok. So once I understand all the plugins that have ever been used on the site (I think the list was complete, but maybe not), what is the process for narrowing down and fixing the problem?
    Should I be looking for the plugin that created the "account_name" db field? Is that the key to my problem? Can I simply find the code for "account_name" and allow NULL as a value? If so, how would I go about that.
    Thanks for your help.
    Number of ways to approach. I would do something like the following not specifically in this order:
    1. Search the files (developers tool kit) for the field account_name to see if it is specifically referenced somewhere in the files.
    2. Install lat9's mydebug backtrace to find the specific location/method that the field is attempted to be processed.
    3. If found that no longer used and is simply some sort of casualty to previously being added as a result of some no longer used plugin would then evaluate removal from the database. If to be removed would delete the field, if to stay then assign it a default value (which may be null, but allowing null as described above is different than assigning a default value).

    As a result of installing ZC through the host's auto installer, would also compare their files to a clean set available from https://www.zen-cart.com/getit. There may be something different in those files as compared to the package provided by ZC.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jul 2015
    Location
    Allentown, PA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Host upgraded servers now customers can't complete an order

    Thanks for the advice. I will get on with it and can hopefully find the issue.
    I have never used the developers toolkit, or the other lat9 mydebug backtrace. Are they open-source?

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,515
    Plugin Contributions
    88

    Default Re: Host upgraded servers now customers can't complete an order

    For the first, go to your Zen Cart admin's Tools->Developers Tool Kit, and search for account_name in any admin/catalog .php file. That will identify all the PHP files that make use of that database field, perhaps giving a clue as to the plugin that's using it.

    The myDEBUG Backtrace plugin is a free download from the Zen Cart site: https://www.zen-cart.com/downloads.php?do=file&id=1879.

  9. #9
    Join Date
    Jul 2015
    Location
    Allentown, PA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Host upgraded servers now customers can't complete an order

    Quote Originally Posted by lat9 View Post
    For the first, go to your Zen Cart admin's Tools->Developers Tool Kit, and search for account_name in any admin/catalog .php file. That will identify all the PHP files that make use of that database field, perhaps giving a clue as to the plugin that's using it.

    The myDEBUG Backtrace plugin is a free download from the Zen Cart site: https://www.zen-cart.com/downloads.php?do=file&id=1879.
    Thanks!
    I did the "lookup in all files" "catalog/admin" ".php only" and it returned:
    Code:
    /home/xxxxxxx/public_html/store/includes/templates/free_template_3/templates/tpl_account_history_info_default.php
    
    Line #145 : if( (($order->info['account_name']) || ($order->info['account_number']) || ($order->info['po_number'])) ) {
    
    Line #150 : <h4><?php echo ENTRY_ACCOUNT_NAME; ?></h4>
    
    Line #151 : <div><?php echo $order->info['account_name']; ?></div>
    Is that the correct search? Would "free template 3" be the plugin that created the account-name field? If so, I don't believe that is the template we are currently using.

  10. #10
    Join Date
    Jul 2015
    Location
    Allentown, PA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Host upgraded servers now customers can't complete an order

    It turns out that "free template 3" is our current template!
    This is the info at the top of the .php file:

    Code:
     Page Template
     *
     * Loaded automatically by index.php?main_page=account_edit.<br />
     * Displays information related to a single specific order
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_account_history_info_default.php 3306 2006-03-29 07:15:46Z drbyte $
    Last edited by JG64; 9 Jul 2015 at 11:50 PM.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v138a Host upgraded to php 5.3.10 - store pages blank now
    By nosnip13 in forum Upgrading to 1.5.x
    Replies: 11
    Last Post: 22 Apr 2012, 09:56 AM
  2. v150 My host upgraded my site, now I have problems
    By Medieval1Knight in forum General Questions
    Replies: 4
    Last Post: 8 Apr 2012, 02:50 AM
  3. Host upgraded PHP to 5 now UTF-8 vs Latin1 text encoding issues
    By dharma in forum Installing on a Linux/Unix Server
    Replies: 10
    Last Post: 15 Jan 2009, 05:09 PM
  4. Host upgraded to PHP5 now I can't login to admin
    By erikcw in forum General Questions
    Replies: 1
    Last Post: 15 Jan 2007, 04:57 PM
  5. Upgraded 1.3.5 to 1.3.5 now can't make a new account!
    By kelvyn in forum Upgrading from 1.3.x to 1.3.9
    Replies: 0
    Last Post: 29 Oct 2006, 08:52 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR