Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Account Number Mod


khaaliq

Recommended Posts

Can someone tell me how to add the customer account number to the order email? I have been playing around with different variables but with no luck :cry:

 

This mod adds an account number to the order for those that are not familiar with it. Really a great contribution.

Link to comment
Share on other sites

This will add the account number to the original e-mail that is sent when the customer confirms the order which is what I think you are after.

 

In catalog/checkout_process.php find this around line 220:

 

// lets start with the email confirmation

 $email_order = STORE_NAME . "n" .

                EMAIL_SEPARATOR . "n" .

                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "n" .

                EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "n" .

                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "nn";

 if ($order->info['comments']) {

   $email_order .= $order->info['comments'] . "nn";

 }

 $email_order .= EMAIL_TEXT_PRODUCTS . "n" .

                 EMAIL_SEPARATOR . "n" .

                 $products_ordered .

                 EMAIL_SEPARATOR . "n";

 

Change it to this:

 

// lets start with the email confirmation

 $email_order = STORE_NAME . "n" .

                EMAIL_SEPARATOR . "n" .

                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "n" . EMAIL_TEXT_ACCT_NUMBER . ' ' . $order->customer['acct'] . "n" .

                EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "n" .

                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "nn";

 if ($order->info['comments']) {

   $email_order .= $order->info['comments'] . "nn";

 }

 $email_order .= EMAIL_TEXT_PRODUCTS . "n" .

                 EMAIL_SEPARATOR . "n" .

                 $products_ordered .

                 EMAIL_SEPARATOR . "n";

 

Then add this define to catalog/includes/languages/english/checkout_process.php:

 

define('EMAIL_TEXT_ACCT_NUMBER', 'Account Number:');

 

HTH

Link to comment
Share on other sites

No problem....I hope to re-do this mod for MS1 in the next week or so and will add this on as it couldn't hurt. The option to have the database automatically insert the account number will also be included.

Link to comment
Share on other sites

  • 3 months later...

What about using this account number to verify the account setup by sending this to them in the account created e-mail. Then provide a link back to the site where they must enter this "account number" along with the e-mail and password to begin making purchases. This will ensure that the customer is providing a valid e-mail address before they are allowed to buy on the site. Does anyone know how to do this? Or have any suggestions or ideas on how to accomplish the e-mail verification?

 

Thank you for any help!!!

:wink: :wink: :lol:

-Richard

---------------------------------------------------

Where would I be without the Forums?!?!

Link to comment
Share on other sites

  • 2 months later...

I do not know if you figured it out already. In OSC 2.2MS2 I used this to get the customer id number to show up in the order email.

 

In catalog/checkout_process.php

 

 $email_order = STORE_NAME . "n" .

                EMAIL_SEPARATOR . "n" .

                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "n" .

                EMAIL_TEXT_CUSTOMER_NUMBER . ' ' . (int)$customer_id . "n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "n" .

                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "nn";

 

and I added this to catalog/includes/languages/english/checkout_process.php:

 

 define('EMAIL_TEXT_CUSTOMER_NUMBER', 'Customer Number:');

 

 

It works for me so far. I'll try to help you if it doesn't work, but no promises since I am very new to this.

 

Thank you JB for the code you supplied a long time ago, it really led me in the right direction!

 

HTH

Kamie

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.
Note: Your post will require moderator approval before it will be visible.

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