Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What's wrong with this 1 line statement?


blueline

Recommended Posts

echo "Add Test: " . tep_address_member_label($member_id, '1', true, ' ', '<br>');

 

Assuming that I have changed the name of the function from tep_address_label to tep_address_member_label and instead of asking for $customer_id I have used member_id (which holds a value of 9 for a current member)....

 

Any ideas why it isn't outputting any text?

 

Pretty much stock osC code...

 

can be found in /catalog/includes/functions/general.php

 

Thanks,

-Chris

Chris Sullivan

Link to comment
Share on other sites

Hi!

 

Your code in general.php should look like this (using MS2 code)

 

  function tep_address_member_label($member_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_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)$member_id . "' and address_book_id = '" . (int)$address_id . "'");

   $address = tep_db_fetch_array($address_query);



   $format_id = tep_get_address_format_id($address['country_id']);



   return tep_address_format($format_id, $address, $html, $boln, $eoln);

 }

 

Make sure you have NOT changed the <b>where customers_id =<b> to <b>where member_id =<b>

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

I have changed it....as I have added another field (members_id) to the address book table.

 

When I type that query into phpMyAdmin ( a mySql web-based admin system) I do get a full result....however, when I try to echo the main function nothing is actually printed to the screen.

 

Any clue?

Chris Sullivan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...