1. agelinas

    agelinas New Member

    Joined:
    May 11, 2010
    Messages:
    12
    A user of Amember in charge of membership for an organization would like to have the members names appear in the Payments Report INSTEAD OF the Login Name (which is rather meaningless for her).

    Is there a simple way to make this change? Or any other suggestions?

    Thank you for any insight.

    Al
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I dont think theres a simple way since that screen shows payment records- I could be wrong but i dont think payment records record full names, just member ids, so it will take a bit of extra code to then go and match the member id to full name.

    Possible, but will take a little coding.

    David
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You need to modify get_payments function in mysql.inc.php and query user name from amember_members table:
    PHP:
            $q $this->query($s "SELECT
                p.*, concat(m.name_f, '  ', m.name_l) as member_login,
                pr.title as product_title
                
    $coupon_fields
                FROM 
    {$this->config['prefix']}payments p
                    LEFT JOIN 
    {$this->config['prefix']}members m USING (member_id)
                    LEFT JOIN 
    {$this->config['prefix']}products pr ON (p.product_id = pr.product_id)
                    
    $coupon_join
                WHERE 
    $search_add $where_add $src_pr
                ORDER BY p.begin_date DESC
                
    $limit_exp
                "
    );
  4. agelinas

    agelinas New Member

    Joined:
    May 11, 2010
    Messages:
    12
    Coding works great! Thanks

    Thanks Alex,

    Your coding works great! Just what we needed. You're the best!

    Al

Share This Page