Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Login with customer nmbr help needed


boetje

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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...