How to Modify Email Footer for a specific product?

Discussion in 'Customization & add-ons' started by graujm, Mar 1, 2010.

  1. graujm

    graujm New Member

    Joined:
    Feb 17, 2010
    Messages:
    29
    I am working on a product that is incremented content:
    This product has reminders e-mail:

    Exemple users recieve an email every day + the incremental content is release..

    Now on the footer of this email they have a Link to tell them to unsuscribe if they wish to...

    1 : I guess this won't make them unsuscribe from the product?
    2 : If the unsuscribe I can't give them the autoresponce serries that let them know about the updates!

    My questions is, How can I remove the mail footer for one product autoresponder?

    Thank you
    JM

    PS: I have read this post, but it would modify all the emails footer, this is not what I am looking for but rather take this footer out from a certain product autoresponder
    http://www.amember.com/forum/showthread.php?t=9992&highlight=To unsubscribe from
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I think this would need some customization.
    Best to contact amember about it, or a coder in the 3rd party forum.

    David
  3. graujm

    graujm New Member

    Joined:
    Feb 17, 2010
    Messages:
    29
    will do thank you.

    JM
  4. graujm

    graujm New Member

    Joined:
    Feb 17, 2010
    Messages:
    29
    If any one need this, this is what I have got, will update here for results :

    You can customize /amember/member.inc.php file.
    Replace this code:
    ///////////////////////////
    $et = & new aMemberEmailTemplate();

    $et->name = "mail_autoresponder";

    $et->product_id = ($pr['product_id'] > 0) ? $pr['product_id'] : null;

    $et->day = $days;

    while ($u = mysql_fetch_assoc($q)){

    $u['data'] = $db->decode_data($u['data']);

    $t->assign('user', $u);

    $t->assign('product', $pr);

    $t->assign('login', $u['login']);

    $t->assign('pass', $u['pass']);

    $t->assign('name_f', $u['name_f']);

    $t->assign('name_l', $u['name_l']);

    if ($u['unsubscribed']) continue;

    mail_template_user($t, $et, $u, true);

    }
    ///////////////////////////
    to:
    ///////////////////////////
    $add_unsubscribe = true;
    if ($pr['product_id'] == 12345) // replace 12345 to your Product ID
    $add_unsubscribe = false;

    $et = & new aMemberEmailTemplate();

    $et->name = "mail_autoresponder";

    $et->product_id = ($pr['product_id'] > 0) ? $pr['product_id'] : null;

    $et->day = $days;

    while ($u = mysql_fetch_assoc($q)){

    $u['data'] = $db->decode_data($u['data']);

    $t->assign('user', $u);

    $t->assign('product', $pr);

    $t->assign('login', $u['login']);

    $t->assign('pass', $u['pass']);

    $t->assign('name_f', $u['name_f']);

    $t->assign('name_l', $u['name_l']);

    if ($u['unsubscribed']) continue;

    mail_template_user($t, $et, $u, $add_unsubscribe);

    }
    ///////////////////////////
  5. graujm

    graujm New Member

    Joined:
    Feb 17, 2010
    Messages:
    29
    yep this worked... thank's to help desk
    JM
  6. graujm

    graujm New Member

    Joined:
    Feb 17, 2010
    Messages:
    29
    Just for the update...
    This worked for the autoresponder day "0" but all the other days the unsuscribe link is on the autoresponder messages...

    Any Idea on what was left out?
    I need to take this link out as this is how I give information about the incremental coming up content...

    Here is where and how code was replaced
    On line 522 of the member.inc.php file
    PHP:
    //// Code Replaced to Stop unssubcribe Link bottom mail for product id 1 Autoresponder that tells customers when they recieve updates
               /* $et = & new aMemberEmailTemplate();
                $et->name = "mail_autoresponder";
                $et->product_id = ($pr['product_id'] > 0) ? $pr['product_id'] : null;
                $et->day = $days;
                while ($u = mysql_fetch_assoc($q)){
                    $u['data'] = $db->decode_data($u['data']);
                    $t->assign('user', $u);
                    $t->assign('product', $pr);
                    $t->assign('login',  $u['login']);
                    $t->assign('pass',   $u['pass']);
                    $t->assign('name_f', $u['name_f']);
                    $t->assign('name_l', $u['name_l']);
                    if ($u['unsubscribed']) return;
                    mail_template_user($t, $et, $u, true);
                }*/
                // Replacement Code below
                
    $add_unsubscribe true;
               if (
    $pr['product_id'] == 1// replace 12345 to your Product ID
                   
    $add_unsubscribe false;
               
    $et = & new aMemberEmailTemplate();
               
    $et->name "mail_autoresponder";
               
    $et->product_id = ($pr['product_id'] > 0) ? $pr['product_id'] : null;
               
    $et->day $days;
               while (
    $u mysql_fetch_assoc($q)){
                   
    $u['data'] = $db->decode_data($u['data']);
                   
    $t->assign('user'$u);
                   
    $t->assign('product'$pr);
                   
    $t->assign('login',  $u['login']);
                   
    $t->assign('pass',   $u['pass']);
                   
    $t->assign('name_f'$u['name_f']);
                   
    $t->assign('name_l'$u['name_l']);
                   if (
    $u['unsubscribed']) continue;
                   
    mail_template_user($t$et$u$add_unsubscribe);
               }
                
    // end new code    

  7. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You should do the same mods to
    function member_send_autoresponders(){ from member.inc.php as well.
    It is used to send emails with day more then 0
  8. graujm

    graujm New Member

    Joined:
    Feb 17, 2010
    Messages:
    29
    like doing this on ligne 437

    Will let you know if it worked
    Thank you

    PHP:
    // Old Code, sending unsubscribe link to Product autoresponder
    /*            $et = & new aMemberEmailTemplate();
                $et->name = "mail_autoresponder";
                $et->product_id = ($pr['product_id'] > 0) ? $pr['product_id'] : null;
                $et->day = $days;
                while ($u = mysql_fetch_assoc($q)){
                    $u['data'] = $db->decode_data($u['data']);
                    $t->assign('user', $u);
                    $t->assign('product', $pr);
                    $t->assign('login',  $u['login']);
                    $t->assign('pass',   $u['pass']);
                    $t->assign('name_f', $u['name_f']);
                    $t->assign('name_l', $u['name_l']);
                    if ($u['unsubscribed']) continue;
    $db->log_error("member_send_autoresponders $u[email] day:$days");
                    mail_template_user($t, $et, $u, true);
                }*/

    ///// New code take out link for unsubscribing from product 1
        
    $add_unsubscribe true;
               if (
    $pr['product_id'] == 1// replace 12345 to your Product ID
                   
    $add_unsubscribe false;
               
    $et = & new aMemberEmailTemplate();
               
    $et->name "mail_autoresponder";
               
    $et->product_id = ($pr['product_id'] > 0) ? $pr['product_id'] : null;
               
    $et->day $days;
               while (
    $u mysql_fetch_assoc($q)){
                   
    $u['data'] = $db->decode_data($u['data']);
                   
    $t->assign('user'$u);
                   
    $t->assign('product'$pr);
                   
    $t->assign('login',  $u['login']);
                   
    $t->assign('pass',   $u['pass']);
                   
    $t->assign('name_f'$u['name_f']);
                   
    $t->assign('name_l'$u['name_l']);
                   if (
    $u['unsubscribed']) continue;
    $db->log_error("member_send_autoresponders $u[email] day:$days");
                   
    mail_template_user($t$et$u$add_unsubscribe);
               }
                
    // end new code    


Share This Page