Iceman Posted June 5, 2007 Share Posted June 5, 2007 Hi, I cant seem to find how to do the following...maybe it isnt even possible? We allow customers to pay for Hosting by several means. However, we ONLY allow Credit Card billing for Hosting plans where the Billing Cycle is monthly. How do I go about making this happen? Something seems to be missing. Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 5, 2007 WHMCS CEO Share Posted June 5, 2007 No, there's no way you can do that within WHMCS. Never been requested. Matt 0 Quote Link to comment Share on other sites More sharing options...
Iceman Posted June 5, 2007 Author Share Posted June 5, 2007 Please consider this a request then. (Mods, please move this to the "Feature Requests" section.) Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
Iceman Posted June 5, 2007 Author Share Posted June 5, 2007 Actually... how does everyone else do billing? If you allow monthly billing how do you go about collecting a cheque every month via post? Surely you would be chasing cheques all the time? Or does everyone here only use paypal or other automated means? Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 5, 2007 WHMCS CEO Share Posted June 5, 2007 I think most must just advise the client. Personally, I added a notice saying cheques are not accepted for monthly payments to the payment method selection area on the order form. Being able to specify which payment methods can be used for each individual billing cycle would be a nightmare from a coding point of view. A smarty template edit could also be used to hide the options actually. Matt 0 Quote Link to comment Share on other sites More sharing options...
Iceman Posted June 5, 2007 Author Share Posted June 5, 2007 Hi Matt, A smarty template edit could also be used to hide the options actually That sounds like a plan. I'll look into it. Thanks. Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
PPH Posted June 5, 2007 Share Posted June 5, 2007 Most of our customers pay by check and we only have a problem with one customer at this time who is once again currently suspended. He spends a lot of time suspended...We don't have thousands of accounts though and quite a few are local. 0 Quote Link to comment Share on other sites More sharing options...
Iceman Posted June 5, 2007 Author Share Posted June 5, 2007 Ok, for anyone else interested, here's some smarty code to make this happen. {if $billingcycle=="monthly"} {foreach key=num item=gateway from=$gateways} <input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}"{if $gateway.sysname eq "offlinecc"} checked{else} disabled{/if} /> <label for="pgbtn{$num}">{$gateway.name}</label> {/foreach} <div align="center">NOTE: Monthly Payments must be by Credit Card.</div> {else} {foreach key=num item=gateway from=$gateways} <input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}"{if $selectedgateway eq $gateway.sysname} checked{/if} /> <label for="pgbtn{$num}">{$gateway.name}</label> {/foreach} {/if} Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
Nathan123 Posted June 5, 2007 Share Posted June 5, 2007 Ok, for anyone else interested, here's some smarty code to make this happen. {if $billingcycle=="monthly"} {foreach key=num item=gateway from=$gateways} <input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}"{if $gateway.sysname eq "offlinecc"} checked{else} disabled{/if} /> <label for="pgbtn{$num}">{$gateway.name}</label> {/foreach} <div align="center">NOTE: Monthly Payments must be by Credit Card.</div> {else} {foreach key=num item=gateway from=$gateways} <input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}"{if $selectedgateway eq $gateway.sysname} checked{/if} /> <label for="pgbtn{$num}">{$gateway.name}</label> {/foreach} {/if} Cheers, Paul Hi, Paul Maybe you could give some instructions for the people who don't know where abouts to add the above? Thanks 0 Quote Link to comment Share on other sites More sharing options...
Iceman Posted June 5, 2007 Author Share Posted June 5, 2007 Sure Edit the template file order-stepthree.tpl. Find the section starting with {foreach key=num item=gateway from=$gateways} and ending with {/foreach} Now replace all of that section with the code as stated previously. NOTE: that the code above is for Offline CC processing ie. "offlinecc". You could easily adapt it for any method. To find out what value to use instead of "offlinecc" simply paste the following anywhere on to your template: {$selectedgateway} ... and the current gateway value selected will be displayed. Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 5, 2007 WHMCS CEO Share Posted June 5, 2007 Good work Iceman! Moving this to the User Contributions section. Matt 0 Quote Link to comment Share on other sites More sharing options...
Nathan123 Posted June 5, 2007 Share Posted June 5, 2007 Sure Edit the template file order-stepthree.tpl. Find the section starting with {foreach key=num item=gateway from=$gateways} and ending with {/foreach} Now replace all of that section with the code as stated previously. NOTE: that the code above is for Offline CC processing ie. "offlinecc". You could easily adapt it for any method. To find out what value to use instead of "offlinecc" simply paste the following anywhere on to your template: {$selectedgateway} ... and the current gateway value selected will be displayed. Cheers, Paul Hi, It works great, I like it how it just makes the other gateways unselectable instead of them not being there altogether. Thanks EDIT: Although when someone clicks refresh the order disapears, it didn't before? EDIT: Appears to be okay now. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted September 4, 2007 Share Posted September 4, 2007 Apologies for being thick with this. I can get it to work with worldpay showing up as the payment option, but it blocks out my other 2 options, futurepay and paypal as well. Can you give me the code (please) to make it work with these as well? Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
Terra Posted January 5, 2008 Share Posted January 5, 2008 I've tried to add this code to the new cart.php with version 3.5.1 but it doesn't work - I'm guessing that the variable {$billingcycle} no longer exists (file viewcart.php around line 181). Has anybody managed to integrate this modification with v3.5.1 and the new cart.php system? Many thanks, Edith (aka Terra) 0 Quote Link to comment Share on other sites More sharing options...
drtduarte Posted January 5, 2008 Share Posted January 5, 2008 Great, I was needing this too... 0 Quote Link to comment Share on other sites More sharing options...
Terra Posted January 5, 2008 Share Posted January 5, 2008 Found it! First time I ever worked with Smarty but it's really easy & similar to PHP. This is how it works on my site (version 3.5.1 with cart system): Find this bit of code in /templates/orderforms/cart/viewcart.php around line 181: <p align="center">{foreach key=num item=gateway from=$gateways}<input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}"{if $selectedgateway eq $gateway.sysname} checked{/if} /><label for="pgbtn{$num}">{$gateway.name}</label> {/foreach}</p> and replace with {assign var='monthlyFlag' value='false'} {foreach key=num item=product from=$products} {if $product.billingcycle eq "monthly"} {assign var='monthlyFlag' value='true'} {/if} {/foreach} <p align="center"> {if $monthlyFlag=="true"} {foreach key=num item=gateway from=$gateways} <input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}"{if $gateway.sysname eq "secpay"} checked{else} disabled{/if} /> <label for="pgbtn{$num}">{$gateway.name}</label> {/foreach} <div align="center">NOTE: Monthly Payments must be by Credit Card.</div> {else} {foreach key=num item=gateway from=$gateways} <input type="radio" name="paymentmethod" value="{$gateway.sysname}" id="pgbtn{$num}"{if $selectedgateway eq $gateway.sysname} checked{/if} /> <label for="pgbtn{$num}">{$gateway.name}</label> {/foreach} {/if} </p> NOTE: replace "secpay" with the name of your billing system. And one warning - this code disables all other payment systems as long as ONE item in the basket is monthly. Say e.g. customer has 3 items in the basket, one is monthly, the others are not - the monthly message is triggered. There's not really a way around it as there's only one payment for all items in the basket. Hope this works on other sites - I've just started with WHM & Smarty so please be careful & TEST this code before installing on a live site. Safety first! Edith 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.