Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New account email


khaaliq

Recommended Posts

Is there a mod that sends an email to the store admin whenever someone creates an account but does not order? Can there be a section in admin that displys just new accounts? I would like to find this because my wholesale customers have to create an account and then I go in and change their prices.

Link to comment
Share on other sites

:roll:

 

What exactly is your point???

 

Actually, you know what...just bite me and back off before I shove my foot up your ass yet again. We've already proven time and time again that I can make you look like an idiot at will. Do you really want to go down this road again?

Link to comment
Share on other sites

I would like to know if there is a contribution that sends an email when someone creates an account too?

 

We are giving a free sample to people when they create an account so it would be nice to know when they create an account.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Should be easy enough to add the appropriate logic to create_account_process.php. Just replicate the mail routine that's already there to send the welcome email to the customer, change it to whatever you want it to say and have it send it to you (the shop owner) instead of the customer. Nothing to it. 8)

Link to comment
Share on other sites

But learning is half the fun. :D

 

This is the relevant code from create_account_process.php

 

    // build the message content

   $name = $firstname . " " . $lastname;



   if (ACCOUNT_GENDER == 'true') {

      if ($HTTP_POST_VARS['gender'] == 'm') {

        $email_text = EMAIL_GREET_MR;

      } else {

        $email_text = EMAIL_GREET_MS;

      }

   } else {

     $email_text = EMAIL_GREET_NONE;

   }



   $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

   tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

All you really need to add is another tep_mail line and instead of $email_address put your email address so it sends it to you. You can also add other bits and pieces (customer name, address, etc.) so it makes more sense and allows you the information that you need without having to go to the database to get it.

 

Have fun! :shock:

Link to comment
Share on other sites

Casper,

 

look for this in create_account_process.php

// build the message content 

   $name = $firstname . " " . $lastname; 



   if (ACCOUNT_GENDER == 'true') { 

      if ($HTTP_POST_VARS['gender'] == 'm') { 

        $email_text = EMAIL_GREET_MR; 

      } else { 

        $email_text = EMAIL_GREET_MS; 

      } 

   } else { 

     $email_text = EMAIL_GREET_NONE; 

   } 



   $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING; 

   tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

I just took this

tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

and put it at the end. so that it looks like this

// build the message content 

   $name = $firstname . " " . $lastname; 



   if (ACCOUNT_GENDER == 'true') { 

      if ($HTTP_POST_VARS['gender'] == 'm') { 

        $email_text = EMAIL_GREET_MR; 

      } else { 

        $email_text = EMAIL_GREET_MS; 

      } 

   } else { 

     $email_text = EMAIL_GREET_NONE; 

   } 



   $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING; 

   tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

Then replace the $email_address in the code that you put at the end with your email address.

That sends a welcome email whenever someone creates an account. I still cannot figure out how to replace the welcome text with the persons name, address, etc. :lol:

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