Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Email a friend - How to send 'thanks' for referral


Guest

Recommended Posts

I have a few questions. Each on their own. This question is if anyone has come up with a way to edit the existing "REFER A FRIEND" code to also include a 'thank you' to the referring person? Kind of a way to say thanks in email to them. Not needing a credit to them or anything. Just a simple thank you is all. I know the code sends an email to the new friend saying we were referred to you from John Doe. But, needing to know if we can have it automatically send a thank you to the referring person. Any suggestions, links, already edited code or assistance is appreciated.

 

:thumbsup:

Link to comment
Share on other sites

Your reply was the only one i've received. Thank you. Can you advise what specifically you mean in editing the email? I have edited an email form before. Have knowledge on it. However, I don't know which file it is or path to locate the file. I have browsed for a few hours and would appreciate any help you might offer. I've posted two questions out here and i've gotten zero response from anyone on both. I find my questions sink to the bottom of a list and 'bumping' is the only way to say, "Hey, i'm still waiting for some help, here." I'm not doing it hourly, daily, etc. After I hit a third or fourth page of other topic starters, I feel that I also deserve some assistance instead of falling into never-never land.

 

However, I will appreciate the forum rules and not bump my requests anymore. Again, your assistance is appreciated. Any direction, information or other constructive assistance.

 

Much appreciated,

:thumbsup:

Link to comment
Share on other sites

Please suggest what to paste as far as code. I did put specifics in the original post. I haven't changed anything, so the original download just recently is factory default. I haven't changed anycode in the refer a friend option. Therefore, I can only paste what the software gives to everyone. I hope i'm making sense here. Not trying to be difficult. However, I don't have any modifications to the code at all. I am wondering if anyone has anything related to what i'm searching for. If I paste my code in here, it will just be the factory code from OSC pasting the refer a friend code. I am on newest version of OSC. Have you any experience with what i'm looking to do? Or maybe suggest to me the file to edit the form, etc? I'm not afraid of foot work. I don't ask for the golden key fix. Just some help as to where to start or if someone has already done this, then maybe some direction on where to get this modification. I didn't see it in any searches. And I searched ALLOT. Thanks again for any help you may offer. If you want me to paste the factory refer a friend code, I will gladly do it. Please just tell me which file to get it from. As stated above, I can't seem to locate which file to edit the form in.

 

Thanks,

:thumbsup:

Link to comment
Share on other sites

Hi Mick and anybody else who wants this solution.

This solution also gives you a copy of the tell a friend message.

 

 

Go to catalog/tell_a_friend.php

Find:

 

      tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);

 

Replace it with:

 

      tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);

/* Tell a friend result mail to us goes in here */

$emailus_subject = sprintf(TEXT_TELLUS_SUBJECT, $from_name);
$emailus_body = sprintf(TEXT_TELLUS_BODY1, $from_name , $from_email_address, $to_name, $to_email_address ,tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']), $product_info['products_name'], $message );

tep_mail(DEFAULT_EMAIL_ADDRESS, DEFAULT_EMAIL_ADDRESS, $emailus_subject , $emailus_body , 'Tell a Friend Result Form' , '');

/* Thank the friend */

     $email_friend = sprintf(TEXT_THANK_FRIEND, $from_name , $to_name, $product_info['products_name'],STORE_NAME);
     tep_mail($from_name, $from_email_address, TEXT_THANK_FRIEND_SUBJECT, $email_friend, STORE_NAME, DEFAULT_EMAIL_ADDRESS);

/* end of sending mail */

 

Then go to catalog/includes/languages/english/tell_a_friend.php and insert the following before the ?>

 

define('TEXT_TELLUS_SUBJECT','Tell a friend result from %s');
define('TEXT_TELLUS_BODY1','The Tell A Friend form has been used by %s ( %s )' . "\n\n" . 'They were telling their friend %s ( %s ) about' . "\n\n" .'<a href= %s > %s </a>' . "\n\n" . 'They had the following message for them :' . "\n\n" .'%s' . "\n\n");
define('TEXT_THANK_FRIEND_SUBJECT','Thank you for telling your friend about us');
define('TEXT_THANK_FRIEND','Hi %s,' . "\n\n" . 'Just a quick note to say thank you for telling your friend %s about %s.' . "\n\n" . 'Yours' . "\n" . '%s');
define('STORE_NAME','insert the name of your store');
define('DEFAULT_EMAIL_ADDRESS','insert your [email protected] here');

 

Just remember to replace the text in the STORE_NAME and DEFAULT_EMAIL_ADDRESS with your info.

 

Hope this helps

 

PhilipH

Link to comment
Share on other sites

You are awesome Philip!! Thanks a ton!! It works like a charm. Your assistance is very well received and appreciated!

 

:thumbsup:

 

PS - You may want to add this to the contributions area. It really is a nice added feature to say thanks to a referring customer. Afterall, your customer is basically who most likely would be sending this to a friend or other business. Nice touch of class to say thanks. I'm very pleased, thanks again!

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...