I attempted this a few months ago without success. Here was my original post on the subject:
http://zen-cart.com/forum/showthread.php?t=26953
Now I'm trying again. I'm trying to call up information from the addres book table to add to the office use only footer of the email. I was able to create a query without messing up functions_email.php. I put it right above the big marker that says, end of email functions. Here it is:
//Get customer's city info
$customers_city = $db->Execute("select entry_city from " . TABLE_ADDRESS_BOOK . " where customers_id= '" . $customers_id . "'");
$city = $customers_city->fields['entry_city'];
Then in the office use only section at the bottom of the file I created a city variable below the others like it (I also named the variable in the language file):
OFFICE_USE . "\t" . "\n" .
OFFICE_FROM . "\t" . $from . "\n" .
OFFICE_EMAIL. "\t" . $email_from . "\n" .
OFFICE_CITY. "\t" . $city . "\n" .
And then called that variable like this:
'<tr><td class="extra-info-bold">' . OFFICE_EMAIL. '</td><td>' . $email_from . '</td></tr>' .
'<tr><td class="extra-info-bold">' . OFFICE_CITY. '</td><td>' . $city . '</td></tr>' .
I know the code isn't bad because I can create an account, and everything parses correctly, and I see the word "City" for OFFICE_CITY, but where the $city is in the table, nothing appears.
Any ideas?
Bookmarks