Creating extra Street Address Fields
Posted: Wed Aug 20, 2025 11:37 pm
Hi,
I'm working on version 1.1.0.4
I am trying to create 2 extra street address fields for my site (entry_street_address_2 & entry_street_address_3)
I have created clones of cd_street_address.php for each and have created a new cd_modified_address.php - which is just a copy of the cd_traditional_address with the extra fields added.
A new customer can add the details no problem.
THe issues arise on editing existing addresses and creating additional addresses...
When an address is edited - it seems to update the database, but I then get an error
when I add an additional address it does not update the database and i get a very similar error
Error for update;
Error for additional address;
Obviously there is more I need to do to get this to work, could someone fill me in on what that is?
Thanks
I'm working on version 1.1.0.4
I am trying to create 2 extra street address fields for my site (entry_street_address_2 & entry_street_address_3)
I have created clones of cd_street_address.php for each and have created a new cd_modified_address.php - which is just a copy of the cd_traditional_address with the extra fields added.
A new customer can add the details no problem.
THe issues arise on editing existing addresses and creating additional addresses...
When an address is edited - it seems to update the database, but I then get an error
when I add an additional address it does not update the database and i get a very similar error
Error for update;
Code: Select all
PHP Warning: Undefined array key "customers" in .../includes/system/versioned/1.01.00.00/customer_write.php on line 85
PHP Warning: foreach() argument must be of type array|object, null given in .../includes/system/versioned/1.01.00.00/query.php on line 142
PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 in .../includes/system/versioned/1.0.8.1/database_core.php:67
Stack trace:
#0 .../includes/system/versioned/1.0.8.1/database_core.php(67): mysqli->query('UPDATE customer...', 0)
#1 .../includes/system/versioned/1.0.8.1/database_core.php(119): database_core->query('UPDATE customer...')
#2 .../includes/system/versioned/1.01.00.00/customer_write.php(85): database_core->perform('customers', Array, 'update', '')
#3 .../includes/system/versioned/1.0.5.1/customer_data.php(183): customer_write::update(Array, Array)
#4 .../address_book_process.php(48): customer_data->update(Array, Array, 'address_book')
#5 {main}
thrown in .../includes/system/versioned/1.0.8.1/database_core.php on line 67
Code: Select all
PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '' for key 'uq_customers_email_address' in .../includes/system/versioned/1.0.8.1/database_core.php:67
Stack trace:
#0 .../includes/system/versioned/1.0.8.1/database_core.php(67): mysqli->query('INSERT INTO cus...', 0)
#1 .../includes/system/versioned/1.0.8.1/database_core.php(119): database_core->query('INSERT INTO cus...')
#2 .../includes/system/versioned/1.01.00.00/customer_write.php(39): database_core->perform('customers', Array)
#3 .../includes/system/versioned/1.0.5.1/customer_data.php(167): customer_write::create(Array, Array)
#4 .../address_book_process.php(57): customer_data->add_address(Array)
#5 {main}
thrown in .../includes/system/versioned/1.0.8.1/database_core.php on line 67
Thanks