Hide Payment Fields On Signup.htm

Discussion in 'Templates customization' started by joemungus, Sep 23, 2003.

  1. queen

    queen New Member

    Joined:
    Dec 8, 2006
    Messages:
    7
    Note: I found a work around

    I just commented out these files in the signup.html template:

    <!-- comment out the payment system
    <tr>
    <th>#_TPL_SIGNUP_PAYSYS# *</th>
    <td>

    {foreach from=$paysystems item=p}
    {if count($paysystems)>1}
    <input type="radio" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}"
    {if $p.paysys_id eq $smarty.request.paysys_id }checked{/if} />
    {else}
    <input type="hidden" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" />
    {/if}<label for="paysys_id{$p.paysys_id}"><b>{$p.title}</b>
    <span class="small">{$p.description}</span></label><br /><br />
    {/foreach}

    </td>
    </tr>
    --> &nbsp;



    and this seems to work.

    Cheers,
    Christina

    http://www.shoppingcartmemberships.com
  2. jazzedge

    jazzedge Member

    Joined:
    Aug 11, 2007
    Messages:
    54
    This might help someone else.

    I adjusted signup.html as below. I did this because 1shoppingcart does not provide recurring billing with PayPal. So, I wanted one more 'alert' to let them know to use the PayPal radio button instead.

    In addition, I wanted to change the 1ShoppingCart text to Credit Card.

    Hope this helps. As usual make a backup of signup.html before proceeding. Use at your own risk, blah blah blah.


    Code:
     {foreach from=$paysystems item=p} 
            {if count($paysystems)>1}
            <input type="radio" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}"
                {if $p.paysys_id eq $smarty.request.paysys_id }checked{/if} {if $p.paysys_id eq '1shoppingcart'}onClick='alert("Use this payment option ONLY if you wish to pay by credit card.\n\nDo not use this option for PayPal payments.\n\nChoose the PayPal payment option instead.")'{/if} />
            {else}            
            <input type="hidden" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" />
            {/if}<label for="paysys_id{$p.paysys_id}"><b>{if $p.title eq '1ShoppingCart'}Credit Card{else}{$p.title}{/if}</b>
                <span class="small">{$p.description}</span></label><br /><br />
            {/foreach}
  3. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    tteg,

    Use a different signup page for paid and free memberships as noted above.

    "You can use price_group feature and display different blocks of HTML code for different price groups (and products). For example, you set your free product price group = -1 and refer to signup page as http://yoursite.com/amember/signup.php?price_group=-1"
  4. jbround39

    jbround39 aMember Pro Customer

    Joined:
    Mar 20, 2008
    Messages:
    61
    I have a question somewhat similar to these. When users sign up for my site initially, they ALWAYS sign up for a free membership first. So I set it up so that the payment info doesn't show up for the free signup (as shown above).

    The problem occurs when a user then wants to upgrade and purchase a paid product (I have 2 classes of that). Signup.php appears to only be for people who are initially registering. I can get the paid memberships to show up there, but that is not useful because it requires them to register (and they all will already have memberships and be logged into the site when they get to this point).

    Is there a similar page for people who want to upgrade or purchase a second product? I can tell that option is available on the member page (where they select the product and the paysystem), but I want to be able to link my users directly to a page where they can make the purchase immediately, not the member page.

    Anyone done this or have any suggestions?
  5. nnkkoo

    nnkkoo New Member

    Joined:
    Dec 30, 2008
    Messages:
    3
  6. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    Although this is an older thread, it comes VERY close to answering my question. Is there a way to modify the signup.html code so that the paysystem is not required when a customer is signing up for a free membership?

    I would like to offer both free and paid memberships on the same signup form, and customers are complaining about having to select a payment system for a free membership.

    Is there a way to modify the verification process to only require a payment type with a non-free membership?
  7. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    I figured out the solution to my question. Here it is for others looking to do the same.

    In my setup, the only free product has a product_id=1.

    In signup.php, find this code:
    Code:
        if (!strlen($vars['paysys_id'])){   
            $error[] = _SIGNUP_PLEASE_SELECT_PAYSYS;
    Change it to:
    Code:
        if (!strlen($vars['paysys_id']) && $vars['product_id'] >1){   
            $error[] = _SIGNUP_PLEASE_SELECT_PAYSYS;
    Now, anyone signing up for the free membership won't get an error message if they didn't select a payment type.
  8. mauiamember

    mauiamember New Member

    Joined:
    Oct 14, 2008
    Messages:
    3
    I'm having trouble with this (snip)

    (Never mind, I fixed it... instead of linking with hide_paysys=1, you link to
    hide_paysys=1shoppingcart
    ...if you're using 1shoppingcart to process orders, that is)

    So for me, to remove the "1shoppingcart" field in the order form, I just link to it like:
    signup.php?hide_paysys=1shoppingcart
    -Fixed)
  9. akanowicz

    akanowicz New Member

    Joined:
    Feb 19, 2007
    Messages:
    31
    Yes, the option that alex gives is from 2004; when i tried to use that code I could tell that the base code has changed; and when inserted into the template I get an error.

    What is the update code snipped to hide payment options when a free membership is selected? Note- I have three membership options all listed on the signup page: one free and two paid.
  10. booforum

    booforum Member

    Joined:
    May 20, 2005
    Messages:
    186
    Is there an updated way to do this?

    It seems like there should be some sort of AJAX method, where if the user selects FREE, the "Payment System" would just disappear (so as not to confuse users).

    Any help would be great!
  11. erwinvdb

    erwinvdb aMember Pro Customer

    Joined:
    Aug 30, 2007
    Messages:
    264
    Yes, that's possible. Please see my post here.
    But instead of hiding the product and coupon field you do it with the payment type.
  12. alexve

    alexve aMember Pro Customer

    Joined:
    Nov 19, 2010
    Messages:
    14
    Bumping this thread

    Hiya,

    I'm running Amember 3.2.3 PRO and I am trying to remove the payment processor for a free product that shows on my default signup page (without specifying any pararmeters).

    Amember is setup with one free subscription (in pricegroup 1), the others are paid. Only the free product is visible on the signup page, the other products have negative pricegroups and are not visible.

    The code that I have added to signup.html is in bold:

    {if $smarty.request.price_group eq "1"}
    <input type="hidden" name="hide_paysys" value="true">
    {else}


    {* Select Payment System in same way, only if its count > 1 *}
    {if $smarty.request.hide_paysys }
    <input type="hidden" name="paysys_id" value="{$smarty.request.hide_paysys|escape}">
    <input type="hidden" name="hide_paysys" value="{$smarty.request.hide_paysys|escape}">
    {else}
    {if $config.product_paysystem}
    {assign var="paysys_id_not_required" value="1"}
    {else}

    <label>#_TPL_SIGNUP_PAYSYS#</label>

    {foreach from=$paysystems item=p}
    {if count($paysystems)>1}
    <input type="radio" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}"
    {if $p.paysys_id eq $smarty.request.paysys_id }checked{/if} />
    {else}
    <input type="hidden" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" />
    {/if}<span class="paysys_id{$p.paysys_id}"><b>{$p.title}</b>
    <span class="small">{$p.description}</span></span><br /><br />
    {/foreach}

    {/if}
    {/if}
    {/if}



    The payment processor is removed when I go to the the specific signup url for pricegroup 1, -> e.g. /signup.php?price_group=1 (so the code is working).

    However, when accessing the default signup page for my free product (without adding any parameters to the url), the payment processor still shows...while it shouldn't.

    Can someone please give me a pointer to fix this? Thanks!
  13. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Hi,
    Change this block:
    Code:
    {if $smarty.request.price_group eq "1"}
    <input type="hidden" name="hide_paysys" value="true">
    {else}
    
    to
    Code:
    {if !$smarty.request.price_group  || $smarty.request.price_group == 1}
    <input type="hidden" name="hide_paysys" value="free">
    {else}
    
  14. alexve

    alexve aMember Pro Customer

    Joined:
    Nov 19, 2010
    Messages:
    14
    Thanks! Works perfectly!
  15. dharmainternet

    dharmainternet New Member

    Joined:
    Feb 28, 2011
    Messages:
    5
    Need to remove the pay sys line completely for everything.

    We only take credit cards so we'd like to remove the payment system row completely. We see that the system knows when to send a user to the payment page or not. We've tried it with free products and with 100% coupons. So, since we only have one payment option we just don't think this line is needed. I haven't seen anything in admin that will let me turn this off and although I can see where the code is I'm just not sure how to change it.

    I've tried to change the type from radio to hidden however this didn't work for me, and it also doesn't remove the entire row from the table.

    And wouldn't this do what I need here? Is there a setting in admin cp that I can not find?

    Code:
    if $smarty.request.hide_paysys
    This is the section of code from the signup.html page

    Code:
    {* Select Payment System in same way, only if its count > 1 *}
    {if $smarty.request.hide_paysys }
        <input type="hidden" name="paysys_id" value="{$smarty.request.hide_paysys|escape}">
        <input type="hidden" name="hide_paysys" value="{$smarty.request.hide_paysys|escape}">
    {else}
    {if $config.product_paysystem}
    {assign var="paysys_id_not_required" value="1"}
    {else}
    <tr>
        <th>#_TPL_SIGNUP_PAYSYS# *</th>
        <td>
            {foreach from=$paysystems item=p} 
            {if count($paysystems)>1}
            <input type="radio" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}"
                {if $p.paysys_id eq $smarty.request.paysys_id }checked{/if} />
            {else}            
            <input type="hidden" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" />
            {/if}<label for="paysys_id{$p.paysys_id}"><b>{$p.title}</b>
                <span class="small">{$p.description}</span></label><br /><br />
            {/foreach}
        </td>
    </tr>
    {/if}
    {/if}
    I apologize for posting to this thread if the answer is here in the forum somewhere. I just can't find it.

    Thanks for you help!
  16. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You need to remove above block and add this line instead:
    Code:
    <input type=hidden name=paysys_id value=paypal_r>
    
  17. kimboy

    kimboy New Member

    Joined:
    May 2, 2011
    Messages:
    20
    Yes, the option that alex gives is from 2004; when i tried to use that code I could tell that the base code has changed; and when inserted into the template I get an error.

    What is the update code snipped to hide payment options when a free membership is selected? Note- I have three membership options all listed on the signup page: one free and two paid.
  18. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Sorry not sure I understood can you explain what exactly you want to do?

Share This Page