Need Message When No Products are Avaialble

Discussion in 'Customization & add-ons' started by grantswaim, Apr 28, 2010.

  1. grantswaim

    grantswaim New Member

    Joined:
    Mar 16, 2008
    Messages:
    109
    Alex,

    Just a little suggestion.

    When a user goes to the purchase/renew products page and there are no new products available to the user nothing is displayed (as shown in image below). It is a little confusing to the user. It is like something went wrong,

    I think it would be nice to have a message (maybe even red and bold) display "No New Products Are Currently Available". Then the situation is obvious.

    [​IMG]
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Thnaks for the suggestion .
    As quick fix you can add this to template:
    {if !count($products_to_renew)}No New Products Are Currently Available{/if}
  3. grantswaim

    grantswaim New Member

    Joined:
    Mar 16, 2008
    Messages:
    109
    Thanks Alex,

    I assume you mean add it to member.html

    Any particular place on the page?
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Yes in member.html after this block:
    Code:
    {if $config.member_select_multiple_products}
        {foreach from=$products_to_renew item=p}
        <input type="checkbox" id="product{$p.product_id}" name="product_id[]" value="{$p.product_id|escape}"
            {if in_array($p.product_id, (array)$smarty.request.product_id)}checked="checked"{/if}
            />
            <label for="product{$p.product_id}"><b>{$p.title} ({$p.terms})</b><br />
            <span class="small">{$p.description}</span></label><br /><br />
        {if $p.price <= 0.0 }
        {assign var="paysys_id_not_required" value="1"}
        {/if}
        {/foreach}
    {else}
    <select name="product_id" size="1">
        <option value="">#_TPL_MEMBER_SELECT#</option>
    {foreach from=$products_to_renew item=p}
        <option value="{$p.product_id}"
        {if $p.product_id == $smarty.request.product_id}selected="selected"{/if}>{$p.title} ({$p.terms})
        </option>
        {if $p.price <= 0.0 }
        {assign var="paysys_id_not_required" value="1"}
        {/if}
    {/foreach}
    </select>
    {/if}
    
    
  5. biju_ham

    biju_ham New Member

    Joined:
    Aug 29, 2006
    Messages:
    7
    Hello Alex,

    I tried to follow this fix, but I cant seem to find this block of code in member.html ??
    Did you mean member_add_renew.html
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Yes in 3.1.9 you should modify member_add_renew.html

Share This Page