Jump to content

(SOLVED) Can't get a (transparent) png in my logo header (PS 1.5)


Recommended Posts

Hi all,

 

I just updated to Prestashop and I am now trying to change the jpg file of the header logo in a png file. (because I need a transparent logo)

I know that in PS1.4 you had to change a line in the header.tpl file but the header.tpl file for PS1.5 is totally different.

 

I have got the image quality settings in my back office set to 'Use PNG...' but everytime I upload my png file the transparancy of my logo doesn't change. If I then go back into my BO settings I can see the header logo is a jpg again. (I can see because the transparancy is gone again)

 

I even tried to delete the logo.jpg file in my /img folder but if I do that my header logo doesn't show at all.

 

Any help welcome!!

 

thanks

-Dave

Edited by Nickless (see edit history)
Link to comment
Share on other sites

I found out what to do. For people having the same problem, here's what I did:

 

In PS1.4 you can edit the following line in the header.tpl file of your installed theme:

change:

<img class="logo" src="{$img_ps_dir}logo.jpg?{$img_update_time}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />

 

into:

<img class="logo" src="{$img_ps_dir}logo.png?{$img_update_time}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />

 

If you look close the only thing changed is jpg into png. So it seems jpg is hardcoded in the header.tpl so you'll never be able to change it in your BO. (Why is Prestashop doing this???)

 

Anyways, for PS1.5 find the following code in your header.tpl

src="{$logo_url}"

and change it to:

src="{$img_ps_dir}logo.png?{$img_update_time}"

 

Supposedly the update_time is optional, don't exactly know what it does.

Worked for me!

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...