eunarede Posted January 27, 2008 Share Posted January 27, 2008 Hi, How can I add a picture for each gateway for payment, to differentiate each, as in the picture below? http://upload.eunarede.com/atletas/uploads/image-on-gatewat-payment.jpg 0 Quote Link to comment Share on other sites More sharing options...
chickendippers Posted January 27, 2008 Share Posted January 27, 2008 Glad you like it Basically it's just an if command in checkout.tpl; if gateway name = WorldPay, display these images. 0 Quote Link to comment Share on other sites More sharing options...
eunarede Posted January 27, 2008 Author Share Posted January 27, 2008 Yes chickendippers, I like! Help to differentiate, more than just text! The command is like this? if gateway name=paypal echo "/images/paypal.gif" Thanks for your help! 0 Quote Link to comment Share on other sites More sharing options...
chickendippers Posted January 27, 2008 Share Posted January 27, 2008 I'm not prepared to release my custom code, I hope you understand. But there are plenty of if commands in the templates you can base it on. This should also help: http://www.smarty.net/manual/en/language.function.if.php 0 Quote Link to comment Share on other sites More sharing options...
eunarede Posted January 27, 2008 Author Share Posted January 27, 2008 Yes, I understand, thanks for you help and hint! 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted March 7, 2009 Share Posted March 7, 2009 (edited) Thanks to the tips above I was able to accomplish that and place the payment logos on my cart. Here's how I did it: File: templates/orderforms/default/viewcart.php Around line 165: <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> Add the following code right after <label for="pgbtn{$num}">{$gateway.name} <br />{if $gateway.sysname}<img align="center" src="images/{$gateway.sysname}.gif" />{/if} <br /> So it will look like: <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}<br />{if $gateway.sysname}<img align="center" src="images/{$gateway.sysname}.gif" /> {/if} <br /></label> {/foreach}</p> Now upload your payment images to the whmcs/images folder. Name them according to the payment gateway name: paypal.gif, banktransfer.gif and so on. That's it! Here's what mine looks like: Edited March 7, 2009 by Patty 0 Quote Link to comment Share on other sites More sharing options...
zoilodiaz Posted March 9, 2009 Share Posted March 9, 2009 hello, you know what is the name for the image of 2checkout ? 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted March 9, 2009 Share Posted March 9, 2009 Check the file name on whmcs/modules/gateways. I think it should be tco.gif 0 Quote Link to comment Share on other sites More sharing options...
zoilodiaz Posted March 9, 2009 Share Posted March 9, 2009 hello, thanks so much work perfect now. 0 Quote Link to comment Share on other sites More sharing options...
Alliance Posted September 1, 2009 Share Posted September 1, 2009 thanks a lot, work fine for me too 0 Quote Link to comment Share on other sites More sharing options...
spiderswebdesign Posted September 6, 2011 Share Posted September 6, 2011 Hi Guys this solution works perfect, i would advise to a a break befor your image tag and after the image tag, just looks better. 0 Quote Link to comment Share on other sites More sharing options...
miguel84 Posted May 11, 2020 Share Posted May 11, 2020 Will these mods be lost on WHMCS upgrade? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 12, 2020 Share Posted May 12, 2020 9 hours ago, miguel84 said: Will these mods be lost on WHMCS upgrade? yes - but if you use a hook instead, that should continue to work after upgrading (at least until WHMCS change how they show gateways)... 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.