Edit media appearance in Magento

0

I would like to edit the way the payment methods appear in the Magento checkout, by inserting an image with the banners that each payment system accepts, but I can not.

Which .phtml should I edit?

    
asked by anonymous 09.07.2016 / 02:08

1 answer

0

There is a very easy way to do this and it works great if you want to have your images before the name of the payment method:

See if you have a file named app/design/frontend/seu-tema/seu-tema/template/checkout/onepage/payment/methods.phtml

If this file exists, make a backup copy of it. If it does not exist, copy this file in app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml to the same folder in your theme, as I mentioned before (if not, create checkout/onepage/payment/ ).

Open (your copy of) methods.phtml in the editor and find the following line:

<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>

Here was line 54.

Change to:

<label for="p_method_<?php echo $_code ?>"><img src="<?php echo $this->getSkinUrl('images/'.$_code.'.jpg') ?>" alt="<?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?>" /> <?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>

Enter the image in the theme skin, for the Itaú Shopline method of the Suede (which I use), the code is itaushopline_standard , then the image call is itaushopline_standard.jpg .

If you want to remove the payment name and have only the image, the easiest way is not to rename the payment on the backend. ;)

    
20.07.2016 / 08:46