why is there a text input? It doesn't do anything, when you click the mail icon you still have to enter the friends email address again? How can I get that outta there?
This is a discussion on Tell a Friend Box?? within the osCMax v1.7 General Mods Discussion forums, part of the osCmax v1.7 Forums category; why is there a text input? It doesn't do anything, when you click the mail icon you still have to ...
why is there a text input? It doesn't do anything, when you click the mail icon you still have to enter the friends email address again? How can I get that outta there?
I finally got it to work! I also added a little more to it if anyone is interested.
First off I fixed the problem of the text input box not working.
You can either have it carry forward the name of your friend or the friends email address. I have mine carrying the email address to the next page:
In catalog/includes/boxes find this:
change 'send_to' to 'to_email_address'Code:text' => tep_draw_input_field('send_to', '', 'size="10"') . '&nbsp;' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT);
You could also change it to 'to_name'
I found this in the wiki docs, whenever someone uses the tell a friend, it sends you a copy.
In catalog/tell_a_friend.php
find: around line 80
After that put this:Code:tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); ?>
I had to change the code a little from the original because it was not giving me all the detail it should. The original is here http://wiki.oscommerce.com/docsCatEmailFriendCode://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 T.A.F. submission by ' . $from_name . ' on ' . date("D M j G:i:s Y") . ':'; $report .= "\n\n" . 'Recipient details: ' . $HTTP_POST_VARS['to_name'] . ' - ' . $HTTP_POST_VARS['to_email_address']; $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', 'you@youraddress.com', '[ REPORT ] Tell a Friend Usage', stripslashes($report), '', $from_email_address);
Change you@youraddress.com to your email address.
Note that if you use MIME e-mail you should change all occurances of "\n" to "<br>"
Kristine ~
I seem to be having one of those days, (again;~) I implemented your addition to the TAF script and it works fine on the recipient side, but I'm having a heck of a time getting it to send me a report.
I've tried several valid emails, (yes, including my admin emailand I still get no report.
Did you have any issues like this? If so, any hints as to the resolution?
Dave
(BTW, thanks for all your "other" input. You ask the right ?'s)
Oops - My log-in had timed out. Dave
I'm sorry I didn't notice this reply till now.
I didn't have any problems, it sent me the report right from the start. I'm not sure what your problem might be.
Well I guess if you ask enough, you're bound to ask the right ones! LOL(BTW, thanks for all your "other" input. You ask the right ?'s)
Bookmarks