I'm writing custom checkout section and I'm trying to overwrite payment information section of Magento and use existing methods defined in Mage_Payment_Block_Form_Container.
What I'm doing? config.xml contains
<blocks>
<zigycheckout>
<class>Medex_ZigyCheckout_Block</class>
</zigycheckout>
<payment>
<rewrite><form_container>Medex_ZigyCheckout_Block_Form_Container</form_container>
</rewrite>
</payment>
</blocks>
Block class is defined as class Medex_ZigyCheckout_Block_Form_Container extends Mage_Payment_Block_Form_Container
which contains methods which as already defined in Mage_Payment_Block_Form_Container
like
public function getMethodTitle(Mage_Payment_Model_Method_Abstract $method)
{
$form = $this->getChild('payment.method.' . $method->getCode());
if ($form && $form->hasMethodTitle()) {
return $form->getMethodTitle();
}
return $method->getTitle();
}
but when I call following function in my phtml I'm not getting any return from my function. I think my block is not properly overwritten due to which it's not hitting my block method?
<?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?>
Even the calls like $method = $this->getMethod() is not working.
Do I need to overwrite Payment information related Models also so that these functions should work properly?
[payment/form_container] => Array ( [0] => Medex_ZigyCheckout_Block_Form_Container )– amitshree Jun 15 '15 at 06:13