Is there a way to make the Credit Card payment method always selected and open initially when there are more than one payment method? This is in the Checkout process.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s what I ended up doing.
Copy the \website\app\design\frontend\base\default\template\checkout\onepage\payment\methods.phtml file to the equivalent directory in my theme.
Add a new loop counter variable, $i, at the top after the first comment:
$i = 1;
Inside the
<?php if( sizeof($this->getMethods()) > 1 ): ?>first if conditional check, add the following condition (basically, it checks if this the first payment method and sets it to checked)The else condition is the same as before.
Just before the
<?php endforeach; ?>I added this line (with<?phparound it):$i = $i + 1;
EDIT:
Actually, the only reliable cross-browser way to keep it open was to copy the file here: \app\design\frontend\base\default\template\payment\form\ccsave.phtml to my theme and then remove the style=”display: none;” from the first .
That fixed it so the form was always open and the above code made sure it was selected by default.