Identify Member's Product

Discussion in 'Customization & add-ons' started by komlos, Aug 19, 2003.

  1. komlos

    komlos Guest

    I'm using aMember free with PHP_Include plugin. I have integrated it with a PHP application. I have the following question:

    How can I find out the active subscription for the given user? I'd like to put it into an IF statement. If member has product '1' than do this, if member has product '2' than do that. Of course this is after successful authentication of user.
    (I can protect PHP pages with the "$_product_id = array(1,2); etc." string. This is not the case.)

    Thanks
  2. komlos

    komlos Guest

    Hi

    Is there anyone out there who could help me pls?

    Thanks
  3. alex-adm

    alex-adm Guest

    Please try :

    <? print_r( $_SESSION['_amember_product_ids']); ?>

    Also you can do :

    <? print_r($_SESSION); ?>

    to see all secrets.
  4. komlos

    komlos Guest

    1. Yes, but how can I put this into an IF statement?

    2. The "$_product_id" var works differently than $_SESSION['_amember_product_ids'] (I don't know what is the difference, though). I noticed that "$_product_id" var doesn't work as a member product identifier on pages that are not protected with the PHP_Include method.

    I need product identifying because I'd like to have some links pointing to protected content on every page (even on non-protected pages) after the member logged in. These links would show up according to the product the member has. E.g.: If member has product 1 then the first 4 links will show up out of 8. If member has product 2 then the first 6 links, etc.

    How can I do this? Please let me know. I suppose I need to use one of the two above vars but I don't know in what case I shall use "$_product_id" and in what case I shall use "$_SESSION['_amember_product_ids']" to identify member's product?

    3. Sometimes I need to provide acces to protected content for different members with different products. Like: $_product_id = array(1,2); This provides access to a member with product 1, and for another member with product 2.
    But what happens if there is a trial product e.g.: 3, and members subscribe first to the trial product, then doesn't wait for the trial to be expired but upgrades from member area to one of the paid products. Doing so member will end up having 2 simultaneous subscribtion.
    How should I set the include protection to allow these members to access protected content without allowing members only with trial subscription to access content?
  5. alex-adm

    alex-adm Guest

    please contact support@cgi-central.net if you still have questions.

Share This Page