News:

Support the VirtueMart project and become a member

Main Menu

Select Payment Page (Auto Check Payment Method) not working for me

Started by billo007, December 02, 2012, 02:35:03 AM

Previous topic - Next topic

billo007

I applied the following code http://forum.virtuemart.net/index.php?topic=108974 I just added it to the top of the php file it had no affect is their a particular place I need to place the code?

I was having customers that would type in their credit card #, but were not checking the "radio" button for the payment method.
They were getting frustrated.
This code will auto check the FIRST payment method.

views/cart/tmpl/select_payment.php
<?php
$document = JFactory::getDocument();
$document->addScriptDeclaration("
   jQuery(document).ready(function($) {
    $('input:radio:#payment_id_11').attr('checked',true);
   });
");
?>

change payment_id_11  to your payment id