lukewd Posted October 30, 2012 Share Posted October 30, 2012 I am trying to achieve the following: a way to specify different credit card types available to different merchant gateways? We have 2 merchant gateways on our system, one which we use to process only Visa & Mastercard, and another that is for Amex only. However, when a client is checking out, the order form shows all three card types (as set in the "General Settings --> Invoices --> Available Credit Card Types"). On the order form, I would like for it to be possible to only show Visa & Mastercard in the drop down menu of the one gateway, whilst only showing Amex for the other? Is there any kind of "if" statement I could use to say "if gateway x", only show dropdown options for Visa, and Mastercard, and "if gateway y" then only show Amex? Or any other suggestions? 0 Quote Link to comment Share on other sites More sharing options...
gbrennae Posted November 3, 2012 Share Posted November 3, 2012 You can achieve this by modifying the viewcart.tpl template file in /templates/orderforms/{yourtemplate}/viewcart.tpl Use some smarty logic and JavaScript to display what options you want. Place a jQuery listener on the change event for your gateway radio options or dropdown. When a specific gateway is selected populate the credit card form Card Type dropdown with the options you want for that specifc gateway. Then just rename your gateways to something like "Visa / MasterCard" and "Amex / Discover". If you need more help just ask. This should get you going though. 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.