Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Plugin Contributions
    0

    Default [DONE v1.3.0.2] SQL Error: Adding New Address Book Entry as Primary Address

    Hi,

    An SQL error occurs when adding a new address as the primary address to the address book. I looked into this and the error occurs in includes/modules/pages/address_book_process/header_php.php around line 222.

    Replacing the line
    Code:
    $sql_data_array[] = array('fieldName'=>'customers_firstname', 'value'=>$firstname, 'type'=>'string');
    with
    Code:
    $sql_data_array = array( array('fieldName'=>'customers_firstname', 'value'=>$firstname, 'type'=>'string') );
    solves the problem as far as I can tell.

    Initially, $sql_data_array is created to store data for a query that is performed on the address_book table. Once that query is executed, $sql_data_array is reused to execute another query, but this time on the customers table. The problem is that the variable is not reset and still holds data which corresponds to columns in the address_book table - columns which don't match up to the customers table. :)

    Cheers!

    -Kamil

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,680
    Plugin Contributions
    6

    Default Re: SQL Error: Adding New Address Book Entry as Primary Address

    What version of Zen Cart are you using?

    What version of php are you using?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Jun 2006
    Posts
    3
    Plugin Contributions
    0

    Default Re: SQL Error: Adding New Address Book Entry as Primary Address

    PHP version 4.4.2
    Zen-cart version: 1.3.0.1

    I was able to reproduce the error on a demo I found here: http://demo.opensourcecms.com/zencart/

    Cheers!

    -Kamil

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,680
    Plugin Contributions
    6

    Default Re: SQL Error: Adding New Address Book Entry as Primary Address

    Check the ID on your /pages/address_book_process/header_php.php

    * @version $Id: header_php.php 3160 2006-03-11 01:37:18Z drbyte $
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Jun 2006
    Posts
    3
    Plugin Contributions
    0

    Default Re: SQL Error: Adding New Address Book Entry as Primary Address

    Code:
    @version $Id: header_php.php 3160 2006-03-11 01:37:18Z drbyte $
    Cheers!

    -Kamil

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,680
    Plugin Contributions
    6

    Default Re: SQL Error: Adding New Address Book Entry as Primary Address

    Thanks for the confirmation ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 

Similar Threads

  1. Update Address Book Entry- not updating
    By G33K-Chik in forum General Questions
    Replies: 11
    Last Post: 2 Apr 2009, 02:47 PM
  2. Primary Mailing Address in addition to a Primary Shipping Address
    By southpacific in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 3 Mar 2009, 11:11 PM
  3. Change Address Book Entry Format?
    By panqueconpasas in forum General Questions
    Replies: 1
    Last Post: 5 Oct 2007, 06:05 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
  •