How to limit payment history (php question)

Discussion in 'Customization & add-ons' started by scott_sm, Apr 10, 2009.

  1. scott_sm

    scott_sm New Member

    Joined:
    Aug 22, 2006
    Messages:
    26
    In the member.php, the payment history currently displays ALL payments on account. I would like to limit this list to 3 entries.

    Anyone know how to adjust the php code to display a limited amount of payment history entries? (please be specific, as I'm not a coder)

    Thanks!
  2. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    Find the following in amember/templates/member.html:

    PHP:
    {foreach from=$payments item=p}

    .
    .
    .

    {/foreach}
    change to the following:

    PHP:
    {foreach from=$payments item=p name=payment_loop}

    .
    .
    .

    {if 
    $smarty.foreach.payment_loop.iteration == 3}
    {
    php}break;{/php}
    {/if}
    {/foreach}
    Please be sure to backup member.html before making any changes.

    Jimmy
  3. scott_sm

    scott_sm New Member

    Joined:
    Aug 22, 2006
    Messages:
    26
    Worked perfectly. Thank you!

    One last question - is it possible to limit payment history by date of payment completed? For example, showing only payments within the last 90 days?

Share This Page