Jump to content



Latest News: (loading..)

* * * * * 1 votes

[TIP / TRICK] Tell A Friend Reporting


  • Please log in to reply
61 replies to this topic

#41   fiat707

fiat707
  • Members
  • 80 posts
  • Real Name:KoaFar Wu

Posted 21 December 2003 - 07:21 AM

Hey Guys,

Now you can get some info about someone who sends an email from your store to tell a "friend" regarding your product. Is there any idea in how to deal with the one that sends out unfavored or false messages? Or better is there any way to stop sending out such message from your store before it damages or ruins your business?  Thanks for sharing your tip.

KF

#42   DubZ28

DubZ28
  • Members
  • 407 posts
  • Real Name:James
  • Gender:Male
  • Location:Denver, CO

Posted 03 January 2004 - 07:41 AM

I am running MS1, with tell a friend 1.36 and when I add the code where Mattice said I get a parse error on the first line of code...

Anyone have any ideas?
"You don't need to speak to say something."

#43   Lutroo

Lutroo
  • Members
  • 2 posts
  • Real Name:Matt Edmundson

Posted 05 January 2004 - 11:27 AM

Dude - thanks for this code!

Being a simple man, and also a beginner - I got confused with your blue addition, I thought it was speech marks rather than double apostrophe.

Any simple men like me should just copy the adjustment and paste it - works a treat then!

Again - I thank you!

#44   rmtagg

rmtagg
  • Members
  • 65 posts
  • Real Name:Rosemary
  • Gender:Female
  • Location:PA

Posted 27 June 2005 - 12:15 AM

Oh my!!!! I love it , works great and I like seeing what the item is too!!!! I am a newbie and I have to thank all you wonderful people for all your help and time you put into making things do able for us!

#45   boxtel

boxtel
  • Members
  • 5,237 posts
  • Real Name:amanda
  • Location:Taipei, Taiwan

Posted 27 June 2005 - 05:41 AM

rmtagg, on Jun 27 2005, 08:15 AM, said:

Oh my!!!! I love it , works great and I like seeing what the item is too!!!! I am a newbie and I have to thank all you wonderful people for all your help and time you put into making things do able for us!

<{POST_SNAPBACK}>


I simply use the email queue which saves all send emails.
Treasurer MFC

#46   webtoole

webtoole
  • Members
  • 14 posts
  • Real Name:Matt

Posted 28 June 2005 - 09:43 AM

Thank you Mattice for your wonderful addition.  Also thank everyone else that added and enhananced the code for this thread.  I really appreciate this forum and all of the members.  I was so overwhelmed just 2 weeks ago that I almost gave up on a huge web project for a client and was going to turn it down and find a job bartending or something (Just kidding I love building websites)  I knonw HTML pretty well, but php is way new to me.  With this forum, I not only didn't give up, but so far have made major advancements on the site, have a very happy client with my progress and am very happy about the situation now.  PEACE! :)

#47   FlyingKites

FlyingKites

    Projects Director

  • Members
  • 1,361 posts
  • Real Name:Kym
  • Gender:Female
  • Location:New York

Posted 11 July 2005 - 12:53 PM

boxtel, on Jun 27 2005, 12:41 AM, said:

I simply use the email queue which saves all send emails.

<{POST_SNAPBACK}>


I just found this topic and it is great.  

Tell a Friend is usually used by sites to gather emails for mailing lists as well i.e. the recipient.  We are now starting to use more Tell A Friend type features on sites including an obvious share your wishlist (we have a couple more that are client specific)

Wouldn't it be better if this detail was put into a table in the database and there be a report?

Any thougths on that?
Kym
We support qdPM Open Framework Project Management

#48   hostify

hostify
  • Members
  • 7 posts
  • Real Name:katika saiseni

Posted 26 July 2005 - 05:00 PM

I tried this script. the tell a friend to recipient is working perfectly. But the email that send me a report has no message. Like this..

Here are the details of the T.A.F. submission by MY Name on Tue Jul 26 23:20:37 2005:

Recipient details:  -
Sender details: MY Name - myname@mysite.com
Sender ip address: 99.99.19.7
Personal message:



Product link: http://www.mysite.com/product_info.php?products_id=36

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

you will notice that there is no text or message after the word
Personal message:

What is the problem? How should I fixed it?

#49   MYC267

MYC267
  • Members
  • 514 posts
  • Real Name:Dan
  • Gender:Male
  • Location:Perth, WA

Posted 06 August 2005 - 08:58 AM

I coded this up myself quite some time ago and I found it quite useful. One thing that I found interesting was how much it actually wasn't being used. It doesn't actually get used all that much but those times it is used it's usually people telling their friends about the product in a good way. I don't think I have ever seen it being misused.

As an example here are a few examples of e-mails that I have received recently:





Here are the details of the Tell A Friend submission by Brett on Fri Jul 8 2:54:47 2005:

Sender details: Brett - ***********
Recipient details: ***********
Sender IP address: 61.88.36.65
Personal message:

Not sure if your still thinking it but i though i'd show this to you.
Product Name: ModYourCar Intercooler Kit - Nissan Skyline R33 GTS-T (RB25DET)
Product link: http://www.modyourcar.com.au/product_info....roducts_id=3710






Here are the details of the Tell A Friend submission by graham on Fri Aug 5 20:08:59 2005:

Sender details: graham - ***********
Recipient details: doug - ***********
Sender IP address: 144.137.253.81
Personal message:

this exhaust system will suit a gt4 :-)
Product Name: Greddy Power Extreme II Exhaust System - ECR/BNCR33
Product link: http://www.modyourcar.com.au/product_info....products_id=783







Here are the details of the Tell A Friend submission by dale on Sat Jul 30 6:03:09 2005:

Sender details: dale - ***********
Recipient details: sue - ***********
Sender IP address: 144.139.39.149
Personal message:

look, i found it
Product Name: 'F*UCK' Sticker (300mm long)
Product link: http://www.modyourcar.com.au/product_info....roducts_id=3333

Edited by ModYourCar, 06 August 2005 - 08:59 AM.

Dan

#50   TheMadHatter

TheMadHatter
  • Members
  • 16 posts
  • Real Name:Travis P. Bonfigli

Posted 12 August 2005 - 06:23 PM

I just stumbled upon this mod...EXCELLENT!  Thanks for the code Mattice!!!

Cheers,
Travis

#51   Cowzor

Cowzor
  • Members
  • 79 posts
  • Real Name:Mr Karl

Posted 13 August 2005 - 08:13 AM

Excellent contrib, thanks

#52   Irin

Irin
  • Members
  • 789 posts
  • Real Name:Irina
  • Gender:Female
  • Location:Texas

Posted 04 December 2005 - 06:57 AM

View PostCowzor, on Aug 13 2005, 02:13 AM, said:

Excellent contrib, thanks
Hello,

Thanks for this great contribution. I really love it. I have two questions though.
1. How can I add "Product Model" to the Report? I add

Quote

$report .= "\n\n" . 'Product Model: ' . $products_model = $product_info['products_model'];
but it not enough because the field is left blank in the Report

Quote

Product Model:
2. How can I make a Product link in the Report as well as in the email sent to a Friend clickable?

Thanks a lot.

#53   paq1200

paq1200
  • Members
  • 98 posts
  • Real Name:Mike
  • Gender:Male
  • Location:Texas

Posted 21 March 2007 - 08:52 PM

View PostIrin, on Dec 4 2005, 12:57 AM, said:

Hello,

Thanks for this great contribution. I really love it. I have two questions though.
1. How can I add "Product Model" to the Report? I add
but it not enough because the field is left blank in the Report
2. How can I make a Product link in the Report as well as in the email sent to a Friend clickable?

Thanks a lot.


Did anyone ever figure out how to get the model number to show up in the report?

Thanks
Mike

#54   grunionfab

grunionfab
  • Members
  • 205 posts
  • Real Name:Elaine

Posted 08 May 2007 - 11:47 PM

What a great little bit of code.  It will be interested to see the results from this.  Thanks for the info!

#55   DoctorMason

DoctorMason
  • Members
  • 99 posts
  • Real Name:DK Mason
  • Gender:Male
  • Location:Bakersfield, CA

Posted 16 May 2007 - 02:50 AM

mattice, on Mar , 08:05 AM, said:

Tell A Friend Reporting
The Tell a Friend feature on osCommerce is a popular feature.

[/code]
Things to remember
Note that if you use MIME e-mail you should change all occurances of "n" to "<br>".
Furthermore you should obviously change the e-mail address used to reflect your own.
Regards,
Mattice
PS:
Thanks! Makes you wanna check your emails more often.
Doctor Mason, World's #1 "Temporary Webmaster"

#56   HHHoagie

HHHoagie
  • Members
  • 34 posts
  • Real Name:Robert Hoaglan

Posted 25 May 2007 - 11:32 PM

I am getting double emails sent to my email address.  I'm still playing with my store and after installing the clever little code, I tried my email for the first time.  That when I noticed I was getting two emails sent to me each time.  I don't think it happened when I installed this code but could it be possible.  I don't know where to look to find the problem and I asked this question in the general board but did not get any replies.
Any suggestions please.
Bob

#57   Mrs Minx

Mrs Minx
  • Members
  • 186 posts
  • Real Name:Aha!
  • Gender:Female
  • Location:UK

Posted 30 May 2007 - 11:18 AM

Hey All,

Mattice - THANK YOU ... it works and it is wonderful :)  I am running MS2 so I had to change 'your message' to 'message' to get a sneak preview of what the customer is saying to their mates.

Hostify, you need to do the same.  Its on line 109.

The only slight thing (and I can live with it) is the report that comes back, shows the product URL, but cannot click on it - NO LINK - so I have to paste it into my browser to see what they have looked at.

Anyone know how to get that link enabled please?

Thanks again for a great contribution!! :)
----------------------------------------
Minxy :)

"Keep plodding on to achieve your dreams"

#58   eitai2001

eitai2001
  • Members
  • 37 posts
  • Real Name:Itai Etzman
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 31 May 2007 - 10:23 PM

Hi.

Not sure if anyone already posted this ... too lazy to read, but here is an update with all the correct format for outlook express (and possibly other clients) ... so that when it sends you the e-mail, it creates enters and not little n's. Also, some people using later versions of oscommerce might get nothing where it says "Personal Message", because he used a variable named different to the oscommerce default ... or at least I think its default ... I never changed it ... here it is:

Quote

// Mail a (silent) report to the web owner:



// get ip

if (getenv('HTTP_X_FORWARDED_FOR')) {

     $ip=getenv('HTTP_X_FORWARDED_FOR');

   } else {

     $ip=getenv('REMOTE_ADDR');

}



// build report

   $report  = 'Here are the details of the Tell A Friend submission by ' . $from_name . ' on ' . date("D M j G:i:s Y") . ':';

   $report .= "\n\n" . 'Recipient details: ' . $HTTP_POST_VARS['friendname'] . ' - ' . $HTTP_POST_VARS['friendemail'];

   $report .= "\n" . 'Sender details: ' . $from_name . ' - ' . $from_email_address;

   $report .= "\n" . 'Sender ip address: ' . $ip;

   $report .= "\n" . 'Personal message: ' . "\n\n" . $HTTP_POST_VARS['message'];

   $report .= "\n\n" . 'Product link: ' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?products_id=' . $HTTP_GET_VARS['products_id'];



// mail report

   tep_mail('Tell A Friend', 'itai@digitaladdiction.co.za', '[ REPORT ] Tell a Friend Usage', stripslashes($report), '', $from_email_address);


#59   GreenForce

GreenForce
  • Members
  • 1 posts
  • Real Name:Injee

Posted 26 August 2007 - 08:50 AM

Mattice,

it was what I looking for,
Thanks,

#60   webhigh

webhigh
  • Validating
  • 24 posts
  • Real Name:Web High

Posted 15 February 2008 - 02:31 PM

Does anyone have the complete Tell a friend page code for this I cn 't seem to get it working - I add the code after this line (which is around line 80) tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);


So that my code now looks like this :

      tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);
  // Mail a (silent) report to the web owner:



// get ip

if (getenv('HTTP_X_FORWARDED_FOR')) {

     $ip=getenv('HTTP_X_FORWARDED_FOR');

   } else {

     $ip=getenv('REMOTE_ADDR');

}



// build report

   $report  = 'Here are the details of the Ladyee Boutique Product Information sent to a friend. submission by ' . $from_name . ' on ' . date("D M j G:i:s Y") . ':';

   $report .= "nn" . 'Recipient details: ' . $HTTP_POST_VARS['friendname'] . ' - ' . $HTTP_POST_VARS['friendemail'];

   $report .= "n" . 'Sender details: ' . $from_name . ' - ' . $from_email_address;

   $report .= "n" . 'Sender ip address: ' . $ip;

   $report .= "n" . 'Personal message: ' . "nn" . $HTTP_POST_VARS['yourmessage'];

   $report .= "nn" . 'Product link: ' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?products_id=' . $HTTP_GET_VARS['products_id'];



// mail report

   tep_mail('Tell A Friend', 'webhigh@comcast.net', '[ REPORT ] Tell a Friend Usage', stripslashes($report), '', $from_email_address);



      $messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], tep_output_string_protected($to_name)), 'success');


Emails are sent but I don't get a copy.

Thanks