Results 1 to 5 of 5

Tell a Friend Box??

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 ...

      
  1. #1
    Active Member
    Join Date
    Feb 2004
    Posts
    174
    Rep Power
    9


    Default Tell a Friend Box??

    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?

  2. #2
    Active Member
    Join Date
    Feb 2004
    Posts
    174
    Rep Power
    9


    Default

    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:
    Code:
    text' => tep_draw_input_field('send_to', '', 'size="10"') . ' ' . 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);
    change 'send_to' to 'to_email_address'

    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
    Code:
    tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); ?>
    After that put this:
    Code:
    //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);
    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/docsCatEmailFriend

    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>"

  3. #3
    Anonymous
    Guest


    Default

    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 email and 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)

  4. #4
    New Member
    Join Date
    Feb 2004
    Posts
    9
    Rep Power
    0


    Default

    Oops - My log-in had timed out. Dave

  5. #5
    Active Member
    Join Date
    Feb 2004
    Posts
    174
    Rep Power
    9


    Default

    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.
    (BTW, thanks for all your "other" input. You ask the right ?'s)
    Well I guess if you ask enough, you're bound to ask the right ones! LOL

Similar Threads

  1. Cannot tell a friend about articles
    By jbanda in forum osCMax v2 Features Discussion
    Replies: 0
    Last Post: 08-17-2006, 05:59 AM
  2. Tell a Friend feature
    By countingsheep in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 08-12-2006, 10:16 AM
  3. HTML email a friend
    By adrenalinez in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 09-03-2003, 11:54 AM
  4. Wierd return from 'Tip a friend' and more...
    By Petter in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 02-16-2003, 04:58 AM
  5. Email loaded shopping cart to a friend/client
    By Anonymous in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 11-25-2002, 11:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •