I have multiple magento stores set up. I need to change only one of the stores' header logo to link to an external website. How do I do that?
I know where the header is:
app/design/frontend/default/[YOUR TEMPLATE]/template/page/html/header.phtml
and I know link is in this strip:
<?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:?>
If I change it here, it will change all of the logos on the other stores as well. I only want to change the logo link of one store specifically.
Best Answer
The short and ugly version is to hard code the id of the website and make an
if
statement in the template.The long an clean version is to add a configuration flag with scope website (or store view) and if that is set to 'yes' then display the custom logo and link.
Add something like this in
system.xml
If you add it like this you should find your flag in the
Web
tab fromSystem->Configuration
.Now you can add this in your template:
And you can choose from the configuration panel which store has the custom link and logo.