I am in charge of a Magento website created by a former guy and I followed this tutorial to add a new Picture Link in my header :


But it doesn't work, furthermore the " Free Shipping ..." commented in the tutorial is not displayed in my website whereas i didn't comment it out. Any ideas of what's wrong ?

The code :

<div class="header-container">
<div class="header">
    <?php if ($this->getIsHomePage()):?>
    <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
    <?php else:?>
    <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
    <?php endif?>
     <p class="top-promo" title="<?php echo $this->__('Free Shipping on orders over 50$'); ?>"><?php echo $this->__('Free Shipping on orders over 50$'); ?></p> 
    <a href="why-us"><img src="/media/upload/logo/WhyOrder.gif" alt="Why Order With Us" align="center" > </a>
    <?php echo $this->getChildHtml('topMenu') ?>
<div class="quick-access">
    <?php echo $this->getChildHtml('store_language') ?>
    <p class="welcome-msg"><?php echo $this->getChildHtml('welcome') ?></p>
    <?php echo $this->getChildHtml('topLinks') ?>
<?php echo $this->getChildHtml('topBar') ?>
<?php echo $this->getChildHtml('topContainer'); ?>

Here it's what it looks like now


The red is the picture link added, how could I center it ?


  • Specify the code which you used.
    – vinothavn
    Jun 2, 2015 at 14:35
  • Done, as you can see I add the line mentioned under " Free Shipping .. " line
    – Remzouz
    Jun 2, 2015 at 14:45

1 Answer 1


Try with the code below

<a href="why-us"><img src="<?php echo Mage::getBaseUrl() ?>/media/upload/logo/WhyOrder.gif" alt="Why Order With Us" align="center" > </a>

Mage::getBaseUrl() in the image src gets the website base url.

Let me know once its worked.

  • it worked, Thanks, now I am trying to center it because the "align" doesn't have any effects on the picture, do you know a way to do that ?
    – Remzouz
    Jun 3, 2015 at 14:43
  • Post the screenshot of how it looks now.
    – vinothavn
    Jun 3, 2015 at 14:44
  • Done, as you can see the red is the picture link, but he is blocked next the logo
    – Remzouz
    Jun 3, 2015 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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