enter image description here
we are using custom payment module. we want to keep that payment method enable .

but we don't want to show this payment under Checkout > payment method. so we deleted the design part of that module.

but the Radio button is still displaying under "payment method " at the last.

How to Hide that radio button only for that payment method?

  • what are the code for payment method. ? Commented Dec 10, 2015 at 7:57
  • is there any way to find the code ? Commented Dec 10, 2015 at 7:59
  • inspect element and you will find that code. it is after id="p_method_ {here is code} Commented Dec 10, 2015 at 8:00
  • Let me get this straight. You want the payment method enabled but not available to the checkout proccess? What for? Commented Dec 10, 2015 at 8:01
  • 2
    Go admin side : System ->Configuration -> Payment Methods ( Your custom method If Enable Yes then cahnge to: NO and save)
    – Abdul
    Commented Dec 10, 2015 at 8:05

2 Answers 2


you can add if condition on payment method code

 <input id="p_method_<?php echo $_code ?>" <?php if($_code=='yourcode') { ?> style="display:none"<?php } ?> value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
  • i got the payment method code, in which file , i have to add the above if condition? Commented Dec 10, 2015 at 8:03
  • Checkout/onepage/payment/method.phtml Commented Dec 10, 2015 at 8:36



near line 44 you will find

    foreach ($methods as $_method):
         $_code = $_method->getCode();
         <dt id="dt_method_<?php echo $_code ?>">

Change it to

    foreach ($methods as $_method):
        $_code = $_method->getCode();
        if($_code == 'YOUR_CODE'){continue;}//add this line
        <dt id="dt_method_<?php echo $_code ?>">

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.