Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help required - modification to show DOB


Guest

Recommended Posts

Folks,

 

I'm using DOB as an example here to save time & space.

How can I modify the code so that on checkout, I can see the date of birth listed?

 

I have taken ot_subtotal as an example and modified it as follows :-

function ot_gender() {

$this->code = 'ot_gender';

$this->title = MODULE_ORDER_TOTAL_DOB_TITLE;

$this->description = MODULE_ORDER_TOTAL_DOB_DESCRIPTION;

$this->enabled = ((MODULE_ORDER_TOTAL_DOB_STATUS == 'true') ? true : false);

$this->sort_order = MODULE_ORDER_TOTAL_DOB_SORT_ORDER;

 

$this->output = array();

}

 

function process() {

global $order, $currencies;

 

$this->output[] = array('title' => $this->title . ':',

'text' => $this->getdob());

}

 

but I only see Date of Birth:

with no data.

Any help would be much appreciated!

 

Francol

Link to comment
Share on other sites

Oops - I forgot to add this function :-

 

function get_dob() {

$dob_query = tep_db_query("select dob from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'");

}

Link to comment
Share on other sites

  • 3 weeks later...
Oops - I forgot to add this function :-

 

function get_dob() {

      $dob_query = tep_db_query("select dob from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'");

      }

 

 

OK - managed to figure it out!

Link to comment
Share on other sites

Could you post the full code to show the DOB on the invoice. I need to have it send as part of the emailed invoice. :) Thank you!

 

I only used DOB as an example because it was easy to explain what I needed to get done which was more complex.

The code should work as given above - I had some problems with the ordering of the information in order totals.

 

Are you sure you want to send such information regarding DOB on emails or invoices? I'd freak out if somebody did that to me. Identity theft is a big problem in the US AND uk so most people would not like it if you did.

 

Francis

Link to comment
Share on other sites

I only used DOB as an example because it was easy to explain what I needed to get done which was more complex.

The code should work as given above - I had some problems with the ordering of the information in order totals.

 

Are you sure you want to send such information regarding DOB on emails or invoices? I'd freak out if somebody did that to me. Identity theft is a big problem in the US AND uk so most people would not like it if you did.

 

Francis

 

 

Well I actually modified the DOB field to have the customers Resale license number. So its actually just sending that. :) I don't completely understand the code above. :( Where and how should I cut and paste it? Thanks in advance!

Link to comment
Share on other sites

Well I actually modified the DOB field to have the customers Resale license number. So its actually just sending that. :) I don't completely understand the code above. :( Where and how should I cut and paste it? Thanks in advance!

 

You cut and paste it at the beginning of the file. See the ot_subtotal module as an example. Other excellent examples that I am very thankful for are the handling fee and Customer Loyalty discount contributions.

These should give you an idea of what you need to do.

 

Francis

Link to comment
Share on other sites

Can't get it to work. I just need the DOB to show up in this section. I'm new to PHP, but decent at minipulating how it works. :(

 

$email_order = STORE_NAME . "\n" . 
                EMAIL_SEPARATOR . "\n" . 
                EMAIL_TEXT_INVOICE_URL . " Please login to the shop and click My Account at the top to see all previous orders" . ' ' . "\n" .
                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

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...