boetje Posted November 1, 2008 Share Posted November 1, 2008 Dear people, I installed the contrib 2242, which works fine though I'm trying to customize my invoice.php The thing is I want the invoice to show me the normal assigned customer nmbr if the customized one hasn't been assigned. This is a little code snipplet with the prob if (IQ_ADDITIONAL_CUSTOMERS_NUMBER == 'enable') { $customers_number_query = tep_db_query("select customers_additional_customers_number from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($order->customer['email_address']) . "'"); $customers_number = tep_db_fetch_array($customers_number_query); if ($customers_number['customers_additional_customers_number'] == '') { strip_tags($order->customer['id_customer']); } else { echo $customers_number['customers_additional_customers_number']; } } Hope to get some help. Thanks in advance. Wkr, Boetje Quote Link to comment Share on other sites More sharing options...
boetje Posted November 2, 2008 Author Share Posted November 2, 2008 Problem solved. added an argument to the tep_query and rewrote line of echo. Thus new piece of code if (IQ_ADDITIONAL_CUSTOMERS_NUMBER == 'enable') { $customers_number_query = tep_db_query("select customers_additional_customers_number, customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($order->customer['email_address']) . "'"); $customers_number = tep_db_fetch_array($customers_number_query); if ($customers_number['customers_additional_customers_number'] == '') { echo $customers_number['customers_id']; } else { echo $customers_number['customers_additional_customers_number']; } } Greetz, Boetje Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.