sorting active subscriptions?

Discussion in 'Templates customization' started by rfairweather, Jun 25, 2009.

  1. rfairweather

    rfairweather New Member

    Joined:
    Jul 28, 2008
    Messages:
    19
    What if a customer bought 100+ products from my site? How would they sift through all of it to find the one they want? Is there a search feature? A way to sort them? A way to edit the php code to only show certain product groups?

    Anything!?
  2. rfairweather

    rfairweather New Member

    Joined:
    Jul 28, 2008
    Messages:
    19
    Did a little hack and added a if statement, ill just change the price groups so that it only shows them according to price group. solved.

    <!-- display links to protected areas for customer -->
    {if $smarty.session._amember_products}{* Customer have active subscriptions, display it if config allows *}
    <table><tr><td><ul> <!-- table to align subscriptions -->
    {foreach from=$member_products item=p}
    {if $p.price_group == 1}
    <li>
    {if $p.url gt "" }
    <a href="{$p.url}">{$p.title}</a>
    {else}
    <b>{$p.title}</b>
    {/if}
    </li>
    {/if}
    {foreach from=$p.add_urls item=t key=url}
    <li><a href="{$url}">{$t}</a></li>
    {/foreach}
    {/foreach}
    </ul></td></tr></table>
    {else}{* Customer doesn't have any active subscriptions *}
    <h3>#_TPL_MEMBER_NO_SUBSCR#</h3>
    #_TPL_MEMBER_USE|<i>|</i>#<br />
    #_TPL_MEMBER_ORDER_SUBSCR#<br />
    {/if}
    <br />
    <table><tr><td>
    {foreach from=$left_member_links item=t key=u}
    <li> <a href="{$u|escape}">{$t}</a></li>
    {/foreach}
    </td></tr></table>
    <!-- end of display links to protected areas for customer -->
    -----------------------------------------------------------------------------------------
    Now.... is there a way to alphabetize them?

    so file_test_2009_06_16
    comes before
    file_test_2009_06_17
  3. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Yes it can be done.
  4. rfairweather

    rfairweather New Member

    Joined:
    Jul 28, 2008
    Messages:
    19
    examples? sample code?
  5. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Have you tried the 'Manage Products' section of admin control panel to start with to save actual code changes. Otherwise you will need to include a sort routine into your script.
  6. rfairweather

    rfairweather New Member

    Joined:
    Jul 28, 2008
    Messages:
    19
    I'm not sure what "to save actual code changes" refers to. But since I dont know what youre saying, my answer is... no?

    hmm
  7. rfairweather

    rfairweather New Member

    Joined:
    Jul 28, 2008
    Messages:
    19
    ... are you referring to the selection under Product Availability/Visibilty, the Sorting Order field? If so, i'll try this.

    Thanks!
  8. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Sorry yes I was. Don't know how I got to posting it the way I did!!

Share This Page