Display Product ID for a pending subsciption?????

Discussion in 'Troubleshooting' started by maxpower, Aug 2, 2007.

  1. maxpower

    maxpower New Member

    Joined:
    Aug 2, 2007
    Messages:
    2
    I am trying to display a users subscribed product ID once they have logged in.. But only if the subsciption is Pending.
    Eg.
    Hi User,
    You have ordered {ordered subsciption}.
    Your payment of {subsciption cost} is outstanding.

    Please make payment as soon as possible.


    I can't seem to get it working though


    If I use this in php:
    print_r($_SESSION['_amember_product_ids']);

    All I get is "Array ( )" .. Unless the user has paid for their subsciption.


    Could someone please help me display the id of a pending subscription?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    That array will not work because it will contain only active subscriptions.
    You need to query amember_payments table:
    $db->query("select * from amember_payments where member_id=$member_id and completed=0");

Share This Page