Diff
1612
1699
1699
general.php
  |
492 | 492 | | // Return a formatted address |
| |
493 | 493 | | // TABLES: customers, address_book |
| |
494 | 494 | | function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") { |
  |
| 495 | + | if (is_array($address_id) && !empty($address_id)) { |
| |
| 496 | + | return tep_address_format($address_id['address_format_id'], $address_id, $html, $boln, $eoln); |
| |
| 497 | + | } |
| |
| 498 | + | |
  |
495 | 499 | | $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_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 . "'"); |
| |
496 | 500 | | $address = tep_db_fetch_array($address_query); |
| |
497 | 501 | | |
|