0

I have two allowed payment methods, Paypal and Credit card. When a user checks out Pay Pal is selected by default and is shown on top. How do I change the order of these with the credit card option on div on top and make the radio button for credit card, the option selected by default?

1
  • 1
    Can you not rearrange the preferred payment methods by going to /admin/store/settings/payment/edit/methods ? (d6)
    – Jukebox
    Feb 11, 2013 at 23:10

1 Answer 1

0

Probably with hook_form_alter. Change the #weight attribute so credit card lighter than paypal. Set the #default value to credit cards for the radio values.

I haven't used these modules nor have an Ecommerce site live so I cant post example code ...

EDIT

install Devel and implement hook_form_alter for your module. put dpm($form);dpm($form_id); in your form atler implementation ... and goto the page with the form in question. You will then see the PHP array structure for the form on the screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.