You are here:  » Adding Logo

Support Forum



Adding Logo

Submitted by Gobbo on Tue, 2011-11-22 19:57 in

Hi,

I am trying to add our logo on PT, followed http://www.pricetapestry.com/node/3370 about a hour ago and nothing happened. Has anybody got any help on this matter?

Gobbo

Submitted by support on Tue, 2011-11-22 20:47

Hi Gobbo,

Welcome to the forum!

It's probably best in the first instance to add your logo directly into html/header.php and then move on to positioning / how you wish it to appear on different pages (e.g. home page / search result / product pages).

If you could try as follows;

1) revert back to the distribution version of html/header.php

2) Upload your logo to the /images/ folder of your Price Tapestry installation, using a suitable filename, e.g. "logo.jpg".

3) Edit html/header.php and add the following code right at the end:

<div class='logo'>
<img src='<php print $config_baseHREF; ?>images/logo.jpg' />
</div>

That would be the first step; the positioning / appearance of the logo can then be further modified via a new .logo class in your default.css - let me know if you're still not sure re: the above, and moving on how / where you'd like your logo to appear depending on page...

Cheers,
David.
--
PriceTapestry.com

Submitted by Gobbo on Wed, 2011-11-23 23:39

David,

Thanks for that.

After 2 hours finally got the logo to show on the front page, but how do we center it over the search box? Then on every other page have it 50% in the right hand corner? Also having the logo link to home would be a bouns.

Also we are having some problems with a few product feeds not being in the correct places i.e. no photo just a link to a 404 page. How can we see and edit the database in PT? Or do we have to go into the sql?

Kind Regards,
Gobbo

Submitted by support on Thu, 2011-11-24 10:18

Hi Gobbo,

If you added your logo to the home page using the suggested code above, then to center it above the search box, simply add the following to your default.css:

.logo {
  text-align: center;
}

As regards all other pages, to have your logo at 50% size and top-right corner, create a new file called html/user_header_after.php. In that file, place the following code:

<?php if ($_SERVER["PHP_SELF"] != "index.php"): ?>
<div style='text-align: right'>
<img src='<php print $config_baseHREF; ?>images/logo.jpg' width='100' />
</div>
<?php endif; ?>

Adjust the width='100' to the actual width you wish the smaller version of your logo to be as required.

Regarding invalid images in feeds; if images generally don't work for a merchant it's best not to register the image field that way you won't get lots of broken image links across your site; there's no need to have to edit the database at all, simply go back to /admin/ and then click Register alongside the feed; and if the Image URL field has been auto-selected, simply change it back to "Select..." and then re-register / import and that will clear Image URLs for that feed...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Gobbo on Thu, 2011-11-24 19:16

Hi David,

Thanks for the help.

But, I can't get this to work:-

<div class='logo'>
<img src='<php print $config_baseHREF; ?>images/logo.jpg' />
</div>

But instead this works:-

<div class='logo'>
<img src='images/bargain-xs-logo.gif' />
</div>

Ok, so in what script does PT look for 'html/user_header_after.php', as I have done this and nothing is happening.

Kind Regards,
Gobbo

Submitted by support on Fri, 2011-11-25 13:42

Hi Gobbo,

html/header.php looks for html/user_header_after.php however occasionally the file_exists function doesn't always return correctly depending on server / PHP version; as an alternative; simply paste your code into the end of html/header.php and that will work just fine...

Cheers,
David.
--
PriceTapestry.com

Submitted by Blastaway on Thu, 2011-12-22 14:49

Hi,

i am new and trying do insert the logo. But the main logo on the home page is keep following to the serch page and the
small logo i on the hompage and on the search page.
You can see for yourself here {link saved}

Submitted by support on Thu, 2011-12-22 15:49

Hi Blastaway,

Where you have added your logo code in html/header.php;

<div class='logo'>
<a href=''><img border='0' src='images/logo.png' /></a>
</div>

...make sure that the src attribute begins with '/', but also to hide the logo on the home page (where you only want it displayed large and centered), REPLACE the above with:

<?php if ($_SERVER["PHP_SELF"!="/index.php"]): ?>
<div class='logo'>
<a href=''><img border='0' src='/images/logo.png' /></a>
</div>
<?php endif; ?>

Finally, make sure that the only other place that the logo is referenced is in index.php where I think you have it currently - as long as that is the only place the code appears then it shouldn't follow through incorrectly into the other pages...

Cheers,
David.
--
PriceTapestry.com

Submitted by Blastaway on Fri, 2011-12-23 13:27

Hi, David

I did replace the code in my html/header.php with this

<?php if ($_SERVER["PHP_SELF"!="/index.php"]): ?>
<div class='logo'>
<a href=''><img border='0' src='/images/logo.png' /></a>
</div>
<?php endif; ?>

I only have the logo code in 2 places html/header.php and html/user_header_after.php

but now the large logo don't show on my startpage at all, only the small one that i did save in user_header_after.php that i suppose to only be visible on the serchpage?

Best regards

Submitted by support on Fri, 2011-12-23 13:50

Hi,

As you already have logo code in html/header.php, I would actually remove any logo code from html/user_header_after.php, and it sounds like that should instead be added directly into index.php to display your large logo on the search / home page.

In the distribution verison; you'll find that a spacer is used, which is what you probably want to replace with your logo code. Look for the following at line 8:

  print "<div style='height:120px;'>&nbsp;</div>";

...and REPLACE with:

  print "<img src='/images/logo.png' />";

(or adjust for the large version of your logo if you have different sizes)

If you're not sure at all of course email me any modified files and I will check everything for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by Gobbo on Wed, 2012-02-01 20:59

Hi David,

How do we swap over our logo with the search box? So the logo is on the left and the search box is on the right?

Placing the home link in the logo would also be a bonus.

We would also like to add links to Facebook over the search box on the front page and text links to our blog over the search box in the header.

Kind Regards,
Gobbo

Submitted by support on Thu, 2012-02-02 08:54

Hello Gobbo,

If you would like to email me your html/header.php I'll swap the positioning for you (and make the logo a link) and also indicate where you can add Facebook / other links above the search box...

Cheers,
David.
--
PriceTapestry.com

Submitted by IG on Thu, 2013-03-28 11:44

Hi David

I am working on a new site: ({link saved})

I have managed to show the logo on top and centered above the search box on the homepage by putting this code into index.php:

print "<div style='margin-top:120px;'><img src='/images/logo.png' /></div>";

However, despite placing the following code in header.php the logo doesn't show up on any other page:

<?php if ($_SERVER["PHP_SELF"!="/index.php"]): ?>
<div class='logo'>
<a href=''><img border='0' src='/images/logo.png' /></a>
</div>
<?php endif; ?>

Can you please advise me why this is not working?

Kind regards,
IG

Submitted by support on Thu, 2013-03-28 12:10

Hello IG,

Have a go with:

<?php if (strpos("index.php",$_SERVER["PHP_SELF"])===FALSE): ?>
<div class='logo'>
<a href=''><img border='0' src='/images/logo.png' /></a>
</div>
<?php endif; ?>

(this method accounts for any prefix that might exist in PHP_SELF)

Hope this helps!

Cheers,
David.
--
PriceTapestry.com