Looking for an elegant solution to this...

Discussion in 'Pre-Sales Questions' started by jackgordon, Jul 3, 2011.

  1. jackgordon

    jackgordon Member

    Joined:
    Mar 23, 2009
    Messages:
    269
    I can think of a few ways to do this, but they all seem rather messy.

    What I want to do is set up a series of hundreds or thousands of 10-member clubs. Individuals can sign up for any club that has open slots (i.e. fewer than 10 subscribers) as long as they can pay the price for it.

    There wouldn't be much individual administration needed for the clubs within aMember. Just weekly rebilling and occasional communication.

    How would you design this?
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Sounds like it could be done using a limit plugin- Ken Gary developed one for me a while back, but hasnt marketed it.

    Basically, you can set how many products can be ordered- eg 10 left.
    This would solve the only 10 members allowed problem.

    As for the communication issues, not sure... Maybe you would need to create a list in aweber for each product, and somehow (dont know of how) allow the club owner to send messages.

    David
  3. jackgordon

    jackgordon Member

    Joined:
    Mar 23, 2009
    Messages:
    269
    In Ken's plugin, would it automatically show the products with available slots, and automatically hide products with no open slots?

    I'm not concerned with the communication part - aMember's built in tools could handle that.

    Also, how does aMember handle a large volume of products? Is there any sort of a limit before it gets unwieldy?
  4. kengary

    kengary aMember Pro Customer

    Joined:
    Nov 13, 2008
    Messages:
    231
    The plugin that David and I developed has the options to show how many slots are left.

    The way that works is that you would edit the signup.html template, or create a special version for this usage, and edit it with code and calls to display the values you want to show. So you can make the page say what you want it to say with calls to get the actual numbers to make it make sense.

    Here is an example from the readme.txt file that describes this process:

    Code:
     5. Modify your /amember/templates/signup.html template to show your <strong>Sold Out 
        Message</strong> if the quantity of your items go below 1 and you allow products to 
        still be sold.
        
        a. Edit /amember/templates/signup.html
        
        b. Find this block of code:
        
            {foreach from=$products item=p} 
            {if count($products) &gt;1}
            {if $config.select_multiple_products}
            &lt;input class="required" 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}
                /&gt;
            {else}
            &lt;input class="required"  type="radio" id="product{$p.product_id}" name="product_id" value="{$p.product_id|escape}"
                {if $p.product_id == $smarty.request.product_id }checked="checked"{/if}
                /&gt;
            {/if}{* end if $config.select_multiple_products *}
            {else}
            &lt;input type="hidden" id="product{$p.product_id}" name="product_id" value="{$p.product_id}" /&gt;
            {/if}   
                &lt;label for="product{$p.product_id}"&gt;&lt;b&gt;{$p.title}&lt;/b&gt; ({$p.terms})&lt;br /&gt;
                &lt;span class="small"&gt;{$p.description}&lt;/span&gt;&lt;/label&gt;&lt;br /&gt;
            {if $p.price &lt;= 0.0 }     {assign var="paysys_id_not_required" value="1"}    {/if}        
            {/foreach}
    
        c. Replace it with this block of code which will display the Sold Out Message when an item reaches 0 quantity in stock:
        
            {foreach from=$products item=p} 
              <strong>{if $p.productcount_instock&lt;1 && $p.productcount_nobackorder != 1}
                &lt;label for="product{$p.product_id}"&gt;&lt;b&gt;{$p.title}&lt;/b&gt; ({$p.terms} &lt;br /&gt;
                &lt;b&gt; {php} echo ProductCountSoldOutMessage(); {/php} &lt;/b&gt;)&lt;br /&gt;
                &lt;span class="small"&gt;{$p.description}&lt;/span&gt;&lt;/label&gt;&lt;br /&gt;
              {else}</strong>
                {if count($products)&gt;1}
                  {if $config.select_multiple_products}
                    &lt;input class="required" 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}
                    /&gt;
                  {else}
                    &lt;input class="required"  type="radio" id="product{$p.product_id}" name="product_id" value="{$p.product_id|escape}"
                    {if $p.product_id == $smarty.request.product_id }checked="checked"{/if}
                    /&gt;
                  {/if}{* end if $config.select_multiple_products *}
                {else}
                  &lt;input type="hidden" id="product{$p.product_id}" name="product_id" value="{$p.product_id}" /&gt;
                {/if}   
                &lt;label for="product{$p.product_id}"&gt;&lt;b&gt;{$p.title}&lt;/b&gt; ({$p.terms})&lt;br /&gt;
                &lt;span class="small"&gt;{$p.description}&lt;/span&gt;&lt;/label&gt;&lt;br /&gt;
              <strong>{/if}{* end if product is allowed to be sold when quantity is below 1 *}</strong>
              {if $p.price &lt;= 0.0 }     {assign var="paysys_id_not_required" value="1"}    {/if}        
            {/foreach}
    
        d. Save your changes.
        
        e. Upload signup.html back to your server.
        
        NOTE: The above code is just an example.  There are many different ways to 
              configure this with the data now being kept on each product.
    
  5. jackgordon

    jackgordon Member

    Joined:
    Mar 23, 2009
    Messages:
    269
    Thanks guys!

    I look forward to diving in and seeing what I can do with this.

Share This Page