How can I prevent someone from ordering the same product twice?

Discussion in 'Troubleshooting' started by dan_kelly, Sep 19, 2007.

  1. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    Hi,

    I want to prevent someone from ordering a membership more than once.

    Can anyone show me how to do that?

    Thanks,
    Dan
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    On the bottom of the manage product/your product:
    Disallow subscription to this product if the following conditions meet and user has:


    Just highlight the product you don't want them to be able to order again.

    David
    __________________
    Discover How to Start-Up and Run a Profitable Membership Site
    ==> Membership Academy <==
    Comparisons, reviews, forums and videos on membership software and payment systems.
  3. blgts

    blgts New Member

    Joined:
    Aug 12, 2007
    Messages:
    7
    Put some message in "membership type"

    Ok, supposely member has subscribed to all types of membership i offer to them, so amember will display nothing in the box

    So i need to put some messages to tell members that "Membership Type - You've subscribed to all"

    How to do so ?

    thx
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Change this block in member.html template:
    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} ({if $p.price > 0 }{$config.currency|default:"$"}{$p.price}{else}free{/if})</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="0">#_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} 
        ({if $p.price > 0 }{$config.currency|default:"$"}{$p.price}{else}free{/if}) 
        </option>
        {if $p.price <= 0.0 }
        {assign var="paysys_id_not_required" value="1"}
        {/if}        
    {/foreach}
    </select>
    {/if}
    {if $paysys_id_not_required }
          <input type="hidden" name="paysys_id_not_required" value="for javascript" />
    {/if}
    

    to this :
    Code:
    {if !$products_to_renew}
    {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} ({if $p.price > 0 }{$config.currency|default:"$"}{$p.price}{else}free{/if})</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="0">#_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} 
        ({if $p.price > 0 }{$config.currency|default:"$"}{$p.price}{else}free{/if}) 
        </option>
        {if $p.price <= 0.0 }
        {assign var="paysys_id_not_required" value="1"}
        {/if}        
    {/foreach}
    </select>
    {/if}
    {if $paysys_id_not_required }
          <input type="hidden" name="paysys_id_not_required" value="for javascript" />
    {/if}
    
    {/if}
    
  5. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Sorry code was wrong. Here is correct:
    Code:
    {if !$products_to_renew}
    You've subscribed to all
    {else}
    {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} ({if $p.price > 0 }{$config.currency|default:"$"}{$p.price}{else}free{/if})</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="0">#_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} 
        ({if $p.price > 0 }{$config.currency|default:"$"}{$p.price}{else}free{/if}) 
        </option>
        {if $p.price <= 0.0 }
        {assign var="paysys_id_not_required" value="1"}
        {/if}        
    {/foreach}
    </select>
    {/if}
    {if $paysys_id_not_required }
          <input type="hidden" name="paysys_id_not_required" value="for javascript" />
    {/if}
    
    {/if}
    

Share This Page