Display a message to user if certain product purchased

Discussion in 'Templates customization' started by behaviourneeds, Jul 26, 2012.

  1. behaviourneeds

    behaviourneeds Member

    Joined:
    Jan 26, 2010
    Messages:
    47
    Hi.

    How do I display a message to those people who have ONLY 'bought' a free membership product - if they have purchased a recurring product as well as the FREE membership I dont want to display the message.

    Does that make sense!

    HTML:
    <div id="memberMessage" style="width:100%;">
    {foreach from=$member_products item=p}
        {if $p.product_id eq "46" }
          Free membership product purchased
        {else}
            &nbsp;
        {/if}
    {/foreach}</div>
    Regards
    Chris
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I this on a php page, wordpress or other integration? Or on the amember members page?
    Version 3.x or 4.x?

    David
  3. behaviourneeds

    behaviourneeds Member

    Joined:
    Jan 26, 2010
    Messages:
    47
    Hi.

    This is in the main templates/member pages and using v3.3

    Cheers
    CHris
  4. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Did you r code above not work? looks right to me.

    David
  5. behaviourneeds

    behaviourneeds Member

    Joined:
    Jan 26, 2010
    Messages:
    47
    It does work, BUT if they have the free product as well as a subscription product I DONT want to display the message and I am having trouble getting my head round the syntax

    Chris

Share This Page