Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Help!! Adding a 2nd Address Line


Recommended Posts

Ok, I've already modified the acount forms so that you can enter a 2nd Address Line... and created a database field in the table for it... All of that works fine!


However, in the /catalog/address_book.php file, it displays the address... but not the 2nd line of it... and I can't figure out for the life of me where to add it! I've narrowed it down (I think) to the following places, but I don't know what to do...


File /catalog/includes/functions/general.php:


Starting at Line 421...


After the following line:

$street = tep_output_string_protected($address['street_address']);

I added this:

$street2 = tep_output_string_protected($address['street_address2']);


At Line 495...


I modified the following with the "entry_street_address2" addition:

function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") {

$address_query = tep_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_street_address2 as street_address2, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$address_id . "'");



File /catalog/address_book.php:

Around line 94... this is what displays the formatted address:

<td class="main" valign="top"><?php echo tep_address_label($customer_id, $customer_default_address_id, true, ' ', '<br>'); ?></td>



Any ideas??



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...