0

I would like to add payment logo in my footer, and also to add a facebook block in my footer. Exist it an extension?

2
  • what you mean by footer block?
    – Amit Bera
    Apr 30, 2015 at 18:24
  • A facebook block as pictured on the site that lets click on I like Apr 30, 2015 at 19:02

2 Answers 2

4

Good way of adding payment logo and social icon in footer ,so that admin can easily change these images:

  • Create a static block from admin and add image there.
  • Call that static block in your footer.phtml located at:

app/design/frontend/your_package/your_template/template/page/html

  • You can call static block by using below code:

$this->getLayout()->createBlock('cms/block')->setBlockId('block_id')->toHtml();

Replace block_id with your static block id.

9
  • In the footer.phtml It is necessary to add the code $this-> getLayout()-> createBlock('cms/block')-> setBlockId ('block_id')-> toHtml(); Apr 30, 2015 at 19:22
  • Yes, if you want to call your static block in footer then you have to call in this way. In this way you can change payment logo and other images in footer from admin whenever you want.
    – Sintu Roy
    Apr 30, 2015 at 19:23
  • <?php /* <?php if ($tmp = $this->getChildHtml('block_footer_payment')): ?> <div class="item float-right block_footer_payment"><?php echo $tmp; ?></div> <?php endif; ?> <?php if ($tmp = $this->getChildHtml('store_switcher')): ?> <div class="item float-right"><?php echo $tmp; ?></div> <?php endif; ?> */ ?> Apr 30, 2015 at 20:25
  • I find this code in my footer.phtml and block static was already create. I remove the comments but it does not display my means of payment Apr 30, 2015 at 20:26
  • There isn't any static block calling in your code , that's actually calling of child phtml file. Please use my suggestion of calling static block, this will be a good way of putting icons and images in footer.
    – Sintu Roy
    May 1, 2015 at 6:30
0

Hi cam do this easy at some code;

first out images at skin/frontend/YOUR Package/Your Template/images/

Then Goto app/design/frontend/YOUR Package/Your Template/template/page/html and open footer.phtml

Call this images using code:

<?php echo $this->getSkinUrl('images/yourimagename.imageextension') ;>
1
  • Image path only displayed instead of the image. How to solve this?
    – zus
    Dec 2, 2017 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.