简体   繁体   中英

magento payment method

I have created magento payment method, but after creating order with this method in admin area block Payment Information shows only Order was placed using USD

Other payment methods automatically attache title here (like standart saved cc / check money order / etc.)

Can anyone tell what I must to do to fix this?

By default payment information is displayed in the adminhtml order view using the template app/design/adminhtml/default/default/template/payment/info/default.phtml (sometimes payment info blocks set a different one).
In that template the payment method title is output using

<?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?>

The method Mage_Payment_Block_Info::getMethod() simply returns an instance of the payment method.

The method getTitle() already is implemented in Mage_Payment_Model_Method_Abstract .

public function getTitle()
{
    return $this->getConfigData('title');
}

This means you only need to set the title in the configuration of your payment method at payment/$methodCode/title and you are set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM