Displaying Product Info On Custom .php Page

Discussion in 'Templates customization' started by Jossi, Jun 10, 2003.

  1. Jossi

    Jossi Guest

    am not a PHP coder Please help...

    ... and I need some help.

    I have .php pages on my system and I need to display the user name, product title and product description on the page.

    So far, I have been able to display the user's first name, as follows:

    Code:
    <?
    $_product_id = array(3); 
    include("../membership/plugins/protect/php_include/check.inc.php");
    ?>
    
    <html>
    <head>
    <title>Test Doc</title>
    
    </head>
    
    <body>
    <p>This is a test </font></p>
    Welcome 
    <?
    echo $_SESSION['_amember_user']['name_f']
    ?>
    </p>
    <p> Product Title:
    <?
    echo $_SESSION['????????????']['??????]
    ?>
    </p>
    </body>
    </html>
    
    How do I display the product title and description for the product ID stated on the first line- array (3);
  2. alex-adm

    alex-adm Guest

    You may display it as:

    <? print $_SESSION['_amember_products'][0]['title']; ?>
    <? print $_SESSION['_amember_products'][0]['description']; ?>
  3. Jossi

    Jossi Guest

    That code prints the data from the first product on the array of subscriptions for the user.

    What I need is to print data of the specific product id.
  4. alex-adm

    alex-adm Guest

    Use this code:

    Code:
    <?
    include 'config.inc.php';
    $_product_id = array(2);
    include './plugins/protect/php_include/check.inc.php';
    
    //// 
    
    $pr = get_product($_product_id[0]);
    print $pr->config['title'];
    
    
    ?>

Share This Page