codemaster2008 Posted May 22, 2010 Share Posted May 22, 2010 Hi there, Here is what i need: The user could select the currency on the shopping cart or i could enable it using a parameter on the url (something like ?currency=1), doesn't matter. After click on the checkout button, only the payment gateways set to that currency should be available. Same thing for the monthly payments. Only the payments available for the client's default currency should be available on the invoices. Does anyone knows how can I acomplish that? Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
tomdchi Posted May 23, 2010 Share Posted May 23, 2010 Your going to need a custom mod for that to work. Try looking at action hooks in the documentation. There may be one that you could use to trigger a custom function to route them to the proper place. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted May 24, 2010 WHMCS Support Manager Share Posted May 24, 2010 It's not quite so complicated, you'd edit viewcart.tpl and replace the current payment gateway code with: {if $currency.code eq "USD"} <input type="radio" name="paymentmethod" value="paypal" id="pgbtn0"{if $selectedgateway eq "paypal"} checked{/if} /> <label for="pgbtn0">PayPal</label> {elseif $currency.code eq "GBP"} <input type="radio" name="paymentmethod" value="googlecheckout" id="pgbtn0"{if $selectedgateway eq "googlecheckout"} checked{/if} /> <label for="pgbtn0">Google Checkout</label> {/if} Making substitutions as necessary. 0 Quote Link to comment Share on other sites More sharing options...
dansgalaxy Posted May 24, 2010 Share Posted May 24, 2010 It would be good if more control over which payment gateways was offered, would allow us to be a little more creative with what we offer. For example having it so "Show gateway for GBP & USD but not EURO" and only show gateway if amount is more than £10 and less than £300. I am looking at a variety of gateways at the moment and a lot of them are good for one type of payment but not another, so might have one which works out as an extra 2% on top, but only for payments in GBP where the amount is more than £8 for example. Just a thought 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted May 24, 2010 WHMCS Support Manager Share Posted May 24, 2010 I'm sure it's possible, but would involve slightly more complicated syntax: http://smarty.net/docs.php 0 Quote Link to comment Share on other sites More sharing options...
dansgalaxy Posted May 24, 2010 Share Posted May 24, 2010 Im sure its possible with some long smarty code, maybe I'll do that at some point... been doing a bridge script for WHMCS past few days so maybe later lol 0 Quote Link to comment Share on other sites More sharing options...
codemaster2008 Posted May 25, 2010 Author Share Posted May 25, 2010 Thanks a lot for the information guys, that's exactly what i needed. 0 Quote Link to comment Share on other sites More sharing options...
mhaskell Posted August 6, 2010 Share Posted August 6, 2010 (edited) Hello everyone, John, So in your example, the top line says USD, to add another payment gateway for usd we just add another input ex. <input type="radio" name="paymentmethod" value="paypal" id="pgbtn0"{if $selectedgateway eq "paypal"} checked{/if} /> <label for="pgbtn0">PayPal</label> <input type="radio" name="paymentmethod" value="internetsecure" id="pgbtn1"{if $selectedgateway eq "internetsecure"} checked{/if} /> <label for="pgbtn1">internetsecure</label> and then onto the else.... and then how do we include all other selected currencies instead of just grb Mike Edited August 6, 2010 by mhaskell 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted August 6, 2010 WHMCS Support Manager Share Posted August 6, 2010 Yes that's correct. Then you'd just duplicate the line: {elseif $currency.code eq "GBP"} Replacing GBP with your currency. 0 Quote Link to comment Share on other sites More sharing options...
mhaskell Posted August 6, 2010 Share Posted August 6, 2010 Yes that's correct. Then you'd just duplicate the line: {elseif $currency.code eq "GBP"} Replacing GBP with your currency. paypal has a bunch of currencies... how can i include all of them maybe "GBP", "USD" ... 0 Quote Link to comment Share on other sites More sharing options...
lukewd Posted September 20, 2011 Share Posted September 20, 2011 mhaskell, did you work out how to do this with more than 2 currencies? i want to force ZAR to go through one gateway, and then GBP, USD, AUD, EUR to all go through paypal... How would I do that? 0 Quote Link to comment Share on other sites More sharing options...
lukewd Posted September 22, 2011 Share Posted September 22, 2011 colinwood07, do you have a solution? 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.