Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
boetje

Login with customer nmbr help needed

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×