0
votes

I've created a module for a payment method. Since this method is not well-known, I would like to place an image next to the name in the payment block, and link that to our faq.

What's the best way to place that image there ?

Some posts suggested putting the HTML straight into the title of the name; that seems to work, but the name is also used in other places (for example in the admin) and it seems like a hack.

So far the best I came up with was to add some jquery code to inject the html into the onepage checkout page, but I can only make that work if I observe the steps through the carrousel and inject the html after the payment section expands, because magento resets the html for it.

1

1 Answers

0
votes

Maybe create a function in your block that returns the name and optionally returns the image.

Here is some pseudocode:

function getName($addImage = 0){
    $html = '<span class="my-payment-name">' . $this->getName();
        if ($addImage == 1) :
            $html = $html . '<img src="' . $this->getImage() . '" />';
        endif;
    $html = $html . '</span>;
 return $thml;
}