Changing the logo

Locked

Started by fredz on 1 Feb 2007, 11:51 PM · Views: 5,335

Results 1 to 20 of 26
This thread is locked. New replies are disabled.
1 Feb 2007, 11:51 PM
#1
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Changing the logo

Hello everyone

I am attempting to change the logo situated at the top left corner. I have followed the instructions as per https://www.zen-cart.com/tutorials/index.php?article=256

I am using the following ver

Zen Cart 1.3.7

Database Patch Level: 1.3.7

v1.3.7 [2007-01-30 15:45:02] (Fresh Installation)

I have not installed any new themes. An out of the box install.

As per the instructions, I built my new logo (using firefox) as a GIF file being L551px x H71px called ssr.gif

the file is located at "includes/templates/custom/images/ssr.gif"

I then modified the header.php file as follows.

// added defines for header alt and text
define('HEADER_ALT_TEXT', 'My text in here');
define('HEADER_SALES_TEXT', '');
define('HEADER_LOGO_WIDTH', '551px');
define('HEADER_LOGO_HEIGHT', '71px');
define('HEADER_LOGO_IMAGE', 'ssr.gif');

And saved the file to "includes/languages/english/custom/header.php"

You will note that I have not used capitalized folder names as per the instructions simply becuase the original folder "english" wasn't capitalized from install. so I didn't think it mattered.

The logo didn't change, nor did the text when you hover over the logo.

I am somewhat perplexed by this, as these are the only set of instructions I can find to do this.

Any comments would be most helpfull

Fred

1 Feb 2007, 11:56 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,746
Plugin Contributions:
0

Re: Changing the logo

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

2 Feb 2007, 3:09 AM
#4
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Re: Changing the logo

Update

I have managed to change the logo, but I had to edit the "includes/languages/english/classic/header.php" directly.

I have also noted that the LOGO_WIDTH & LOGO_HEIGHT definitions appear to make no difference to the logo and/or the way it appears. The LOGO_IMAGE definition did work.

I know this is NOT the way it is meant to be done, but when all else fails, what else is left.

Fred

2 Feb 2007, 4:32 AM
#5
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing the logo

Did you select your custom template in the admin under tools->template selection?

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

2 Feb 2007, 6:04 PM
#6
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Re: Changing the logo

afo:

Did you select your custom template in the admin under tools->template selection?

I don't have any custom templates installed. This is still an out of the box installation.

Fred

2 Feb 2007, 6:35 PM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing the logo

FredZ:

I don't have any custom templates installed. This is still an out of the box installation.

Fred

If you want to start changing things, you should create some "custom" information or you'll run into problems later on because you won't remember what you changed and future updates/upgrades will overwrite your changes.

To create a very basic custom template (you can build from there), you need:
includes\languages\YOUR_TEMPLATE\english.php
includes\languages\english\YOUR_TEMPLATE\index.php
includes\languages\english\YOUR_TEMPLATE\header.php (to change the logo)
includes\templates\YOUR_TEMPLATE\template_info.php
includes\templates\YOUR_TEMPLATE\common\tpl_header.php
includes\templates\YOUR_TEMPLATE\images\logo.gif
includes\templates\YOUR_TEMPLATE\css\stylesheet.css

Any where you see a \classic\ folder, you can create a folder for your custom template.

You can just copy the files into your newly created folders from the default locations (in other words copy english.php into includes\languages\YOUR_TEMPLATE\english.php). The only file you need to edit right off is includes\templates\YOUR_TEMPLATE\template_info.php to make the $template_ values meaningful to you and make the template easy to select from the admin.

Don't forget to use a text editor (like Notepad, Textpad or Crimson Editor) to make your changes since other editors may interfere with the php coding.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

11 Feb 2007, 8:48 PM
#8
steverf avatar

steverf

New Zenner

Join Date:
Feb 2007
Location:
Perdido Beach, Alabama
Posts:
34
Plugin Contributions:
0

Re: Changing the logo

Hello all,
I am having the same trouble...however , I did creat "custom" folders as per most of the FAQ suggestions... AND that darn LOGO... is still there... and the background. and I did replace the "logo.gif" in my Includes/templates/custom/images... I am thinking I had to have missed some VERY important instruction...Are we supposed to TELL the ZenCart system the NAME of our CUSTOM folders ?? In ADMIN ? Did I have a terrible brain fart ?
HELP !
Please
SteveRF

SteveRF

12 Feb 2007, 12:50 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing the logo

Are we supposed to TELL the ZenCart system the NAME of our CUSTOM folders ?? In ADMIN ? Did I have a terrible brain fart ?
When you create this you also need to include a file - template_info.php and edit this file to reflect the name of your template:

$template_name = 'Your_Template_Name';

Then in admin > tools > template selection > edit > slect from the drop you template name and update
Admin > tools > layout boxes controller > at the bottom reset.

Zen-Venom Get Bitten

13 Feb 2007, 3:10 AM
#10
newuser avatar

newuser

New Zenner

Join Date:
Feb 2007
Posts:
3
Plugin Contributions:
0

Re: Changing the logo

Hello all,
I am having the same trouble.., I have followed the instructions as per as per https://www.zen-cart.com/tutorials/index.php?article=125, but I can found the folder name's CUSTOM, so I made a new logo put it into includes/templates/classes/images/logo(use same name but new logo),
but unsucessful, please help me how to solve it.
Thanks a lot.
newuser

13 Feb 2007, 4:27 AM
#11
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing the logo

In order for the template overrides to work, they have to be done correctly. YOU have to create the folders for your custom template. Putting your logo in includes/templates/classes/images is the same as not having your own logo.

There are no CUSTOM directories included because they'd be overwritten with every upgrade/update. YOU have to create the folders and call them whatever you want.

To create a very basic custom template (you can build from there), you need:

  • includes/languages/YOUR_TEMPLATE/english.php
  • includes/languages/english/YOUR_TEMPLATE/index.php
  • includes/languages/english/YOUR_TEMPLATE/header.php (to change the logo)
  • includes/templates/YOUR_TEMPLATE/template_info.php
  • includes/templates/YOUR_TEMPLATE/common/tpl_header.php
  • includes/templates/YOUR_TEMPLATE/images/logo.gif
  • includes/templates/YOUR_TEMPLATE/css/stylesheet.css

Any where you see a \classic\ folder, you can create a folder for your custom template.

Once you've created the folders and copied the basic files over (your logo should be in includes/templates/YOUR_TEMPLATE/images/), you can select your template from the admin under tools->template selection.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

13 Feb 2007, 5:28 PM
#12
steverf avatar

steverf

New Zenner

Join Date:
Feb 2007
Location:
Perdido Beach, Alabama
Posts:
34
Plugin Contributions:
0

Re: Changing the logo

Kobra and AFO,
I think I have it now... BUT I need to know this...

Do we "ONLY" copy the files listed by AFO and the "template_info.php" into our CUSTOM folders ? THEN add ONLY the files we change ??

That makes sense to me, so that after future upgrades we can edit and copy the same files back into our custom folders.....

I tried it once without this great info and had to reload back to STOCK becasue I got a page template that was pretty blank and ugly....

This is a VERY IMPORTANT thread and instruction.... We all want minor mods but we have to keep everything in order for upgrades.... understand...
How about "contributions" ? Are contributions ever overwritten during a ZenCart upgrade... I would think not ??

Cobra and AFO... We appreciate your time and help... Thank goodness there are folks here willing to spend time to help us.

THANKS !

SteveRF

SteveRF

13 Feb 2007, 6:22 PM
#13
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing the logo

Hi Steve,

I compiled that list while creating a prototype ZC for someone. Those were the folders/files I used to get it started (in fact, it's still only those folders/files). You could probably get away with fewer folders/files, but I found that list was a good starting point. I'm glad you found it helpful.

You are correct that you only need to duplicate the files you have to change. You can leave the others alone and ZC will take care of it. As you want the look of the site to change, you can add the necessary changes.

You are also correct that this system isolates your changes and makes upgrading easier because you can use something like WinMerge to compare the files you changed to the new versions.

Your question about contributions is a tricky one. If the contribution is compatible with the upgraded version and doesn't involve core files (that get overwritten), then you won't have an issue. Otherwise, you might have to reinstall the contribution. I had to install the new admin levels when I upgraded from 1.2.7 to 1.3.7 because the old one was simply outdated.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

14 Feb 2007, 4:23 PM
#14
gtfm avatar

gtfm

New Zenner

Join Date:
Feb 2007
Posts:
3
Plugin Contributions:
0

Re: Changing the logo

I've been following this thread, because I've re-installed zc for a fifth time now, and I followed the instructions to the "T".

Not only that, I wanted to make sure that I start out with IH2 before I do anything else so I sat with a printout of the IH2 directory tree and painstakingly made sure that every item went where it belonged.

After which I went to admin and installed the image handler2.

So far so good, seems like everything functions.

Then I want to customize, and I'm no stranger to html/css, so I created a folder called includes/templates/IU_1 and then copied the contents of includes/templates/classic into it.

Then went to admin and changed the default template to IU_1

created my own logo IU_logo.gif using MS paint and placed into IU_1/images Now have includes/templates/IU_1/images/IU_logo.gif

Then created a file called includes/languages/english/IU_1/header.php
and modified the existing value 'logo.gif' to 'IU_logo.gif'

And guess what! It didn't work. No matter what I do, a view source shows that the logo.gif comes from template_default, not even classic.

There is something broken and I can't put my finger on it.
Now I've read your post, Afo, and I see that you advocate overloading the custom template directory with the full compliment of files.

Maybe you're right. But that's not how this is suppose to work, it's been said only to copy over those files that you intend to modify.

Is it possible that the current template directory value is changed by the system fro some reason if the system goes outside of the template directory for a module?

Can someone please look into this?

14 Feb 2007, 4:39 PM
#15
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing the logo

Can you post a URL so we can take a peek?

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

14 Feb 2007, 7:41 PM
#16
gtfm avatar

gtfm

New Zenner

Join Date:
Feb 2007
Posts:
3
Plugin Contributions:
0

Re: Changing the logo

I'd love to oblige you Afo, but I'm working on localhost until it's finished.

Is there anything else I can do to help myself?

14 Feb 2007, 7:47 PM
#17
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing the logo

GTFM:

There is something broken and I can't put my finger on it.
Now I've read your post, Afo, and I see that you advocate overloading the custom template directory with the full compliment of files.

Actually, just the opposite. The list contains the basic folders/files needed to create a custom template. Copying the contents of the /classic/ or /template_default/ folder into your custom template folders will make upgrading a pain. You only need to copy the files you are going to use.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

14 Feb 2007, 7:48 PM
#18
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing the logo

GTFM:

I'd love to oblige you Afo, but I'm working on localhost until it's finished.

Is there anything else I can do to help myself?

From your previous post, it appears you've done everything right. I've never run ZC from localhost, so I'm not familiar with the ins and outs of that. I use a testbed on one of my domains to play with ZC.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

15 Feb 2007, 3:32 PM
#19
gtfm avatar

gtfm

New Zenner

Join Date:
Feb 2007
Posts:
3
Plugin Contributions:
0

Re: Changing the logo

I went home yesterday and made sure that I created every item in the list provided by Afo in previous postings.

To no avail.
I placed my IU_logo.gif in various image folders on the admin level, and on the template level, but nothing.

The only thing that would change the situation so that my logo **IU_logo.gif **would be displayed in the header was placing this gif in the
includes/templates/template_default/images folder.

You see, it looks for the right GIF, but in the wrong folder. I suspect that there is something missing or out of place, an extra copy of header.php or tpl_header.php maybe where it doesn't belong. I just can't find the problem.

I checked a view source, and all of my custom CSS files are picked up in the head. Any CSS change I make is picked up (such as background images, colors, etc...). The imagehover.js from the IH2 install was being picked up from the javascript folder in the template_default directory, so I made a copy of the javascript folder in my custom folder and copied over the js. This made it so that the script is now bing picked up from my custom template folder instead. Nothing from template_default.

Why does it insist on looking for the HEADER_LOGO_IMAGE in the template default directory? Why, why, why?

Something is missing the override. Please don't ask me if I changed the current template in admin, obvioulsy the answer is yes.

Someone must be able to identify what to look for. Any one?

22 Feb 2007, 4:11 AM
#20
bluedolphincrow avatar

bluedolphincrow

New Zenner

Join Date:
Feb 2007
Posts:
6
Plugin Contributions:
0

Re: Changing the logo

Aanii Afo and Kobra

I have been reading this thread with interest as I need to change the logo on my zen cart also, like most people I guess.

Anyway I followed all of the directions from both of you and I have a problem I can't quite figure out.

I was able to change my template from admin - tools - templates to my new custom template using the files you listed in your post here in this thread.

Well I must have missed something.

My logo.gif is a picture that I am designing with so I'm using it as a place holder. I changed the sizes to my custom logo.gif in the includes/languages/english/My-Template-Name/header.php so the pic shows fine.

The problem is the whole page is all shifted around. Nothing is in the right place and the left side boxes are pink?

Here is my url so you can see for yourselves what the problem is.

http://www.thecompleatblogger.com/productcenter

Hopefully you can help me.

I am new to zen cart however, I'm not new to html or css or php. I do know I made a big error somewhere :sleepy:

Any and all help would be much appreciated.

Have a marvelous week!

Blessings,
Bluedolphin