Email Template

Discussion in 'Customization & add-ons' started by kbettis, Mar 8, 2010.

  1. kbettis

    kbettis New Member

    Joined:
    Oct 6, 2009
    Messages:
    1
    Trying to figure out how to add the customers address to
    the new payment email that the admin receives. Currently
    they get:

    New payment completed:
    Product:
    Amount:
    Period:

    User details:
    Username:
    Email:
    Name:

    --
    Best Regards,


    And I would like to add the physical mailing address to this email.
    Which means adding the street, city, state, country and zip.

    Can anyone point me in the right direction or a snippet of code.

    I found the following in the /amember/common.inc.php

    function mail_payment_admin($payment_id, $member_id){
    global $db, $config;

    $t = &new_smarty();
    $p = $db->get_payment($payment_id);
    $u = $db->get_user($p['member_id']);
    $pr = $db->get_product($p['product_id']);
    ///////////////////////////////////
    $t->assign('user', $u);
    $t->assign('payment', $p);
    $t->assign('product', $pr);
    ///////////////////////////////////
    $et = & new aMemberEmailTemplate();
    $et->name = "send_payment_admin";
    mail_template_admin($t, $et);
    }

    But have no clue as to what code to add
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can use these tags:
    {$user.street} {$user.zip}{$user.city}{$user.state}{$user.country}

    To template in aMember CP -> Setup -> Email

Share This Page