Jump to content

Hide payment option


aspidagrant

Recommended Posts

Hello!

 

I have created some user groups because some will be distributors and will not actually PAY on the site. Is there a way to enable or show the "Mail in payment" option for a specific group only?

 

I know you can use smarty template do hide certain elements based on log in IF, etc. So I was hoping there was a way to do this.

Link to comment
Share on other sites

i'm sure i've posted how to do this... can't find the thread though! :twisted:

 

if you wanted it so that a client group could only see "Mail In Payment", but everyone else can see all payment gateways (including "Mail In Payment"), you could try something like this...

 

{foreach key=num item=gateway from=$gateways}
{if ($gateway.sysname eq "mailin" and $clientsdetails.groupid eq 1)}<label><input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}" {if $selectedgateway eq $gateway.sysname} checked{/if} /> {$gateway.name}</label>
{elseif $clientsdetails.groupid neq "1"}
<label><input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}" onclick="{if $gateway.type eq "CC"}showCCForm(){else}hideCCForm(){/if}"{if $selectedgateway eq $gateway.sysname} checked{/if} /> {$gateway.name}</label>
{/if} {/foreach}

you'll have to adjust the code for the client group(s) you want to filter, but it should work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated