Jump to content



Latest News: (loading..)

* * * * * 1 votes

[TIP / TRICK] Tell A Friend Reporting


  • Please log in to reply
61 replies to this topic

#21   Waza04

Waza04
  • Banned
  • 680 posts
  • Real Name:Warren Ashcroft
  • Gender:Male

Posted 21 April 2003 - 10:30 PM

What is the error??

Warren

#22   luca75

luca75
  • Members
  • 97 posts
  • Real Name:luca

Posted 22 April 2003 - 09:57 AM

I see the code in process page, last procediment :shock:

#23   jonsteward

jonsteward
  • Members
  • 65 posts
  • Real Name:jonathan steward

Posted 21 July 2003 - 03:13 PM

I too also only see the code outputed on the screen when I run this mod

[img]http://www.nrgreen.com/nrgreenerror1.jpg[/img]

#24   stretchr

stretchr
  • Members
  • 116 posts
  • Real Name:Daniel
  • Location:Georgia, USA

Posted 21 July 2003 - 04:24 PM

Nice addition. Thank you Mattice!
"It's a small world...
But I wouldn't want to paint it!"
Stephen Wright

#25   bdaug001

bdaug001
  • Members
  • 15 posts
  • Real Name:Ben

Posted 24 July 2003 - 06:27 AM

i removed the tell-a-friend box from my store to make room for other things; is it really that popular?  

for anyone who has made the silent email modification, any feedback on whether customers use it and how useful it is in generating leads?

Ben Daughtry
Dachitech Software
www.dtechsoftware.com

#26   jbroomfield

jbroomfield
  • Members
  • 8 posts
  • Real Name:Jonathan
  • Location:Singapore

Posted 29 July 2003 - 12:01 AM

Mattice your help is great, thanks.

I am running on MS2, and in case some of you are also running on MS2 and not getting the personal message showing up in the "silent report", here is the simple fix.

In mattice code, change the the following line:

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

to

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


Hope this helps

#27   Priest

Priest
  • Members
  • 260 posts
  • Real Name:Priest

Posted 29 July 2003 - 10:20 PM

Could somebody maybe want to update this so that those of us running MS2 will be able to use it?

As of right now, I have no clue where to add your code.  The place where you say to add it, no longer exists in the MS2 code.

Thanks,
Priest

#28   TB

TB
  • Members
  • 624 posts
  • Real Name:Tony Hodges
  • Location:Victoria, Australia

Posted 30 July 2003 - 12:37 AM

The following works for me, running current 2.2 CVS.

Find this in catalog/tella_friend.php: (Approx lines 77 - 80)
      $email_body .= sprintf(TEXT_EMAIL_LINK, tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])) . "nn" .

                     sprintf(TEXT_EMAIL_SIGNATURE, STORE_NAME . "n" . HTTP_SERVER . DIR_WS_CATALOG . "n");



      tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);
Add this after above:
/* CC Tell a Friend - BOF */

// 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 .= "nn" . 'Sender details: ' . $from_name . ' - ' . $from_email_address;

    $report .= "nn" . 'Recipient details: ' . $to_name . ' - ' . $to_email_address; 

    $report .= "nn" . 'Sender IP address: ' . $ip; 

    $report .= "nn" . 'Personal message: ' . "nn" . $message; 

    $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',  'you@youraddress.com', '[ REPORT ] Tell a Friend Usage', tep_output_string_protected($report), $from_name, $from_email_address);

/* CC Tell a Friend - EOF */

Let me know how you go...
Tony
"The price of success is perseverance.  The price of failure comes much cheaper."

#29   Farrukh

Farrukh
  • Members
  • 480 posts
  • Real Name:Farrukh Saeed

Posted 03 August 2003 - 08:25 AM

it works smoothly on MS 2.2

Thanks TB

#30   TB

TB
  • Members
  • 624 posts
  • Real Name:Tony Hodges
  • Location:Victoria, Australia

Posted 03 August 2003 - 08:41 AM

Thanks for the feedback... glad to see it works for you.
All credit goes to Mattice for his original submission... :)

Tony
"The price of success is perseverance.  The price of failure comes much cheaper."

#31   Farrukh

Farrukh
  • Members
  • 480 posts
  • Real Name:Farrukh Saeed

Posted 03 August 2003 - 09:52 AM

You can also show the name of the Product so you know which product they are talking about rather then clicking on the link and seeing.

here is the code again

/* CC Tell a Friend - BOF */ 

// 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 .= "nn" . 'Sender details: ' . $from_name . ' - ' . $from_email_address; 

    $report .= "nn" . 'Recipient details: ' . $to_name . ' - ' . $to_email_address; 

    $report .= "nn" . 'Sender IP address: ' . $ip; 

    $report .= "nn" . 'Personal message: ' . "nn" . $message; 

    $report .= "nn" . 'Product Name: ' . $products_name = $product_info['products_name'];

    $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',  'farrukh@arabianbazaar.com', '[ REPORT ] Tell a Friend Usage', tep_output_string_protected($report), $from_name, $from_email_address); 

/* CC Tell a Friend - EOF */


#32   Priest

Priest
  • Members
  • 260 posts
  • Real Name:Priest

Posted 04 August 2003 - 04:13 PM

Well, I have just added it and tried it on MS2.2 and although it does send to the other person, as expected, I do not receive a " Tell-a-Friend"  usage email.

Is there maybe something else I need to turn on in the admin settings?

Thanks,
Priest

#33   TB

TB
  • Members
  • 624 posts
  • Real Name:Tony Hodges
  • Location:Victoria, Australia

Posted 04 August 2003 - 05:37 PM

Did you replace this e-mail address here:

Quote

// mail report  
   tep_mail('Tell A Friend',  '[b]farrukh@arabianbazaar.com Tell a Friend Usage', tep_output_string_protected($report), $from_name, $from_email_address);  
/* CC Tell a Friend - EOF */
With your own?

If not... this could be a reason you're not getting the e-mails.

Cheers,
Tony
"The price of success is perseverance.  The price of failure comes much cheaper."

#34   Priest

Priest
  • Members
  • 260 posts
  • Real Name:Priest

Posted 04 August 2003 - 06:26 PM

Yep, I changed the email address to my own, of course, but still no usage being sent to me.  The Tell-A-Friend is being sent to the "friend"  but the report isn't being sent to me.

~P~

#35   Farrukh

Farrukh
  • Members
  • 480 posts
  • Real Name:Farrukh Saeed

Posted 04 August 2003 - 06:40 PM

Have you enabled Send Email Option in Admin

Admin > Configuration > E-Mail Options > Send E-Mails > true

I am running the above code on my site, and I have tested it many times. Its working perfectly fine.

#36   Farrukh

Farrukh
  • Members
  • 480 posts
  • Real Name:Farrukh Saeed

Posted 04 August 2003 - 06:46 PM

If its still not working for you, then enter this into your Database

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Send To A Friend - Control ON/OFF', 'CONFIG_SEND_TO_A_FRIEND', 'true', 'Would you like to get an email when a visitor uses Send To A Friend ?', 12, 800, '2003-03-14 12:20:07', '2003-03-14 12:20:07', NULL, 'tep_cfg_select_option(array('true', 'false'),'); 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Send To A Friend - Email', 'EMAIL_SEND_TO_A_FRIEND', 'your email', 'Send an Email to this address when someone uses Send to a friend option', 12, 801, '2003-03-14 12:20:07', '2003-03-14 12:20:07', NULL, NULL);


Thanks to Druide for the above mysql code.

it will give you option under E-mail options in Configuration. You can enter the email where you want the report to be send.

Also, try to send the file "tell_a_friend.php" by email.

#37   higabyte

higabyte
  • Members
  • 28 posts
  • Real Name:Tracey

Posted 01 September 2003 - 04:23 PM

worked great mattice!! thanks!!

anyone have any idea why it isnt sending in HTML even though I have it specified to do so?

thanks in advance...

#38   MYC267

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

Posted 15 November 2003 - 11:15 PM

Just found this... very smooth. Yes I think we all like being "big daddy". SPOT ON!!
Dan

#39   inetchoices

inetchoices
  • Members
  • 127 posts
  • Real Name:Khim de Waard
  • Gender:Female
  • Location:North Dakota

Posted 16 November 2003 - 12:47 PM

Mattice:

I was wondering if this mod had been packaged up and put in the contribs section (with compatibility for those of us on MS2 as well)?  I'm totally php stupid and I'd need a line by line "Khim - do this... Khim.. do that" or I'd seriously screw it up.

If it has been added to the contribs area, what is the name of the contrib so I can get this and install it on my shop?

Thanks in advance for writing the mod and for any light you can shed on this subject :-)

Khim~
Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup :-)

#40   unitz

unitz
  • Members
  • 9 posts
  • Real Name:unitz

Posted 24 November 2003 - 12:49 PM

thx alot 4 this great extra.. clouldnt get 2 send the tekst.. but jbroomfield was right i had 2 change the "yourmessage" to "message" thx allot 4 this pointer