RE: [TIP / TRICK] Tell A Friend Reporting
Farrukh <[email protected]> 3 Aug 2003 09:52:40 -0000
| Newsgroups | gmane.comp.web.oscommerce.tips |
|---|---|
| Message-ID | <7614a0c442b324b140786c09eb74e4aa@osCommerce-Forums> |
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=206605#206605
----------------------------------------------------------------
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
[code]/* 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 .= "\n\n" . 'Sender details: ' . $from_name . ' - ' . $from_email_address;
$report .= "\n\n" . 'Recipient details: ' . $to_name . ' - ' . $to_email_address;
$report .= "\n\n" . 'Sender IP address: ' . $ip;
$report .= "\n\n" . 'Personal message: ' . "\n\n" . $message;
$report .= "\n\n" . 'Product Name: ' . $products_name = $product_info['products_name'];
$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', '[email protected]', '[ REPORT ] Tell a Friend Usage', tep_output_string_protected($report), $from_name, $from_email_address);
/* CC Tell a Friend - EOF */[/code]