Displaying only non-free items

Discussion in 'Customization & add-ons' started by jossif, May 18, 2007.

  1. jossif

    jossif New Member

    Joined:
    May 18, 2007
    Messages:
    1
    I need to customize members.html so that the page will:

    - In the Purchased Subscriptions table, list only those subscriptions that are *not* using the Free plugin.

    What do I need to modify in
    PHP:
    {foreach from=$paysystems_select item=p key=i}
    to make it work?

    - I also need to always list *all* Free content on the Active Subscriptions box

    What do I need to modify in
    PHP:
        {foreach from=$member_products item=p}
        <
    li style='color: cd7b00;'>
        {if 
    $p.url gt "" }
            <
    a href="{$p.url}">{$p.title}</a>
        {else}
            <
    b>{$p.title}</b>
        {/if}
        {foreach 
    from=$p.add_urls item=t key=url}  
            <
    li> <a href="{$url}">{$t}</a>
        {/foreach}
        {/foreach}
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    replace
    PHP:
    {foreach from=$payments item=p}
    <
    tr {if $p.is_active}style='font-weight: bold;'{/if}>
        <
    td>{lookup arr=$products key=$p.product_id}
        {if 
    $p.data.CANCELLED}<br /><div class="small" style="font-color: red; font-weight: bold;">#_TPL_MEMBER_CANCELLED#</div>
        
    {elseif $p.cancel_url}<br /><a href="{$p.cancel_url}target=top onclick="return confirm('#_TPL_MEMBER_CANCEL_SUBSCR#')">#_TPL_MEMBER_CANCEL#</a>
        
    {/if}
        </
    td>
        <
    td nowrap="nowrap">{$p.begin_date|amember_date_format}</td>
        <
    td nowrap="nowrap">{if $p.expire_date eq "2012-12-31"} - {else}
             {
    $p.expire_date|amember_date_format}{/if}</td>
        <
    td>
            {if 
    $p.paysys_id == 'manual'}
                
    #_PLUG_PAY_MANUAL_TITLE#    
            
    {else}
                {
    lookup arr=$paysystems key=$p.paysys_id}
            {/if}
        </
    td>
        <
    td style="text-align: right">{$config.currency|default:"$"}{$p.amount}&nbsp;</td>
    {if 
    $config.send_pdf_invoice}<td style="text-align: center">
    {if 
    true or !(($config.member_select_multiple_products or $config.select_multiple_products) and $p.data.0.ORIG_ID)}<a href="member.php?action=get_invoice&amp;id={$p.payment_id}">#_TPL_MEMBER_INVOICE#</a>{else}&nbsp;{/if}
    </td>{/if}

    </
    tr>
    {/foreach}
    to

    PHP:
    {foreach from=$payments item=p}
    {if 
    $p.amount 0}
    <
    tr {if $p.is_active}style='font-weight: bold;'{/if}>
        <
    td>{lookup arr=$products key=$p.product_id}
        {if 
    $p.data.CANCELLED}<br /><div class="small" style="font-color: red; font-weight: bold;">#_TPL_MEMBER_CANCELLED#</div>
        
    {elseif $p.cancel_url}<br /><a href="{$p.cancel_url}target=top onclick="return confirm('#_TPL_MEMBER_CANCEL_SUBSCR#')">#_TPL_MEMBER_CANCEL#</a>
        
    {/if}
        </
    td>
        <
    td nowrap="nowrap">{$p.begin_date|amember_date_format}</td>
        <
    td nowrap="nowrap">{if $p.expire_date eq "2012-12-31"} - {else}
             {
    $p.expire_date|amember_date_format}{/if}</td>
        <
    td>
            {if 
    $p.paysys_id == 'manual'}
                
    #_PLUG_PAY_MANUAL_TITLE#    
            
    {else}
                {
    lookup arr=$paysystems key=$p.paysys_id}
            {/if}
        </
    td>
        <
    td style="text-align: right">{$config.currency|default:"$"}{$p.amount}&nbsp;</td>
    {if 
    $config.send_pdf_invoice}<td style="text-align: center">
    {if 
    true or !(($config.member_select_multiple_products or $config.select_multiple_products) and $p.data.0.ORIG_ID)}<a href="member.php?action=get_invoice&amp;id={$p.payment_id}">#_TPL_MEMBER_INVOICE#</a>{else}&nbsp;{/if}
    </td>{/if}

    </
    tr>
    {/if}
    {/foreach}

Share This Page