Post by svavrek » Thu Jan 23, 2014 3:10 am

So I got a subdomain setup for a wholesale version of my retail store. I told Opencart to use the logo for the wholesale store on the wholesale store, but it does not... the multi store is running great, however it does not change the logo... Any ideas?

New member

Posts

Joined
Sat May 11, 2013 12:05 am

Post by tacobandito » Thu Jan 23, 2014 10:48 am

Maybe a little too complicated, but if opencart by default isn't working for you you might have to get down & dirty with some code...

Code: Select all

<a href="/"><img src="
<?php 

$thisPage = $_SERVER['HTTP_HOST'];

if ($thisPage == 'http://subdomain.domain.com') {
echo "http://domain.com/thislogo.jpg";
} else {
echo "http://domain.com/thatlogo.jpg";
}

?>" alt="logo">

[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me


User avatar
Active Member

Posts

Joined
Sat Mar 30, 2013 12:27 am
Location - Springfield, MA

Post by svavrek » Thu Jan 23, 2014 10:57 am

I can do code. What file specifically do I need to edit?

New member

Posts

Joined
Sat May 11, 2013 12:05 am

Post by tacobandito » Thu Jan 30, 2014 5:53 am

The file in question would be the header.tpl, which by default is located

Code: Select all

/catalog/view/theme/YOUR_THEME/template/common/header.tpl
line 107-11...

Code: Select all

  <?php if ($logo) { ?>

  <div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>

  <?php } ?>
so you would want to change it to...

Code: Select all

  <div id="logo"><a href="<?php echo $home; ?>"><img src="
<?php

$thisPage = $_SERVER['HTTP_HOST'];

if ($thisPage == 'http://subdomain.domain.com') {
echo "http://domain.com/thislogo.jpg";
} else {
 echo $logo;
}
 ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>

[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me


User avatar
Active Member

Posts

Joined
Sat Mar 30, 2013 12:27 am
Location - Springfield, MA
Who is online

Users browsing this forum: No registered users and 27 guests