How to add logo or additional information to custom payment method in Magento?

April 25, 2013 17:08

After you finished the functionality of the custom payment module, you may find that the payment method shows in checkout page is without logo:

payment_method_without_logos

How to add the logo or other additional information below the name of payment method as below image?

payment_method_with_logos

Well, quite easy.

Step 1: in your module config.xml, add following tags in <frontend>:

<layout>
    <updates>
        <your_module_name>
            <file>your_module_name.xml</file>
        </your_module_name>
    </updates>
</layout>

Step 2: add your_module_name.xml in app/design/frontend/<package>/<theme>/layout/:

<?xml version="1.0"?>

<layout version="0.1.0">
    <checkout_onepage_index>
        <reference name="checkout.payment.methods">
            <block type="core/template" name="payment.method.<your_payment_method_code>" template="<your_module_name>/<whatever.phtml>" />
        </reference>
    </checkout_onepage_index>
</layout>

Step 3: add <whatever.phtml> in app/design/frontend/<package>/<theme>/template/<your_module_name>/:

<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?><your_module_name>/card_sm_visa.gif" alt="<?php echo $this->__('VISA'); ?>" />
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?><your_module_name>/card_sm_masterc.gif" alt="<?php echo $this->__('Master'); ?>" />
<div class="additional_info">
    Other additional information
</div>

That is, done!

Share

2 Responses to “How to add logo or additional information to custom payment method in Magento?”

  1. This information helped me to add logo in my business site. Thanks for the valuable info you shared. This will helpful for the shoppers to know the method of payment.

  2. logo is not displayed. i have done all the steps could u please tell me what should i do ?

    thank in adv.