Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Confused by override system with new template

Confused by override system with new template

Locked

Views: 1,412

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
18 Oct 2006, 7:49 PM
#1
pcmt avatar

pcmt

New Zenner

Join Date:
Jun 2006
Location:
Manchester UK
Posts:
59
Plugin Contributions:
0

Confused by override system with new template

I must say, I find this very confusing (although I suppose the smoke will clear).

I've created and activated a new template: my_template. I can see how easy it is to edit the CSS file, as the template contains stylesheet.css, but now I'm trying to alter the dimensions of the logo file in the header. The more I read about the override system the more confused I become.

I'd welcome a bit of assistance with this. There's a file in includes/languages/english called header.php and it contains define('HEADER_LOGO_WIDTH', '192px'); to set the width of the logo image. When I alter the dimensions and upload the file, nothing happens.

I notice there's a /classic folder in includes/languages/english with a file called header.php - when I alter this and activate the classic template, again, nothing happens.

Should I be creating new folders in various places with my template name? What is the correct way to alter the dimensions of the logo image when I'm using my own template.

Regards,

Patrick

18 Oct 2006, 10:53 PM
#2
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Confused by override system with new template

Some suggestions for the new commers if they feel confusing.

First, it is only some basic and relative concept for the template locations.

Look at below
The original file is:
includes/languages/english/header.php

The override file for template - classic:
includes/languages/english/classic/header.php

The override file for template - YOUR_TEMPLATE:
includes/languages/english/YOUR_TEMPLATE/header.php

The override file for template - YOUR_TEMPLATE_X:
includes/languages/english/YOUR_TEMPLATE_X/header.php

Then, no matter "how many" templates you want to use, even over 1xxx. Zen Cart will automatically switch to the files whenever it needed. And each one template or "override file" can have its particular contents.

Therefore if you use YOUR_TEMPLATE_X and you want to modify the header.php,

  1. you need copy from the original file:
    includes/languages/english/header.php

  2. and save it to the override directory YOUR_TEMPLATE_X (or create one if it not existed)
    includes/languages/english/YOUR_TEMPLATE_X/header.php

Then modify the newly copied file for the needs.

.

18 Oct 2006, 11:12 PM
#3
pcmt avatar

pcmt

New Zenner

Join Date:
Jun 2006
Location:
Manchester UK
Posts:
59
Plugin Contributions:
0

Re: Confused by override system with new template

Thanks for that. What threw me is:

define('HEADER_LOGO_WIDTH', '192px');

... which doesn't do anything. The program sets the logo width (and height) according to the actual image that is uploaded.

Patrick

18 Oct 2006, 11:17 PM
#4
kobra avatar

kobra

Black Belt

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

Re: Confused by override system with new template

I'd welcome a bit of assistance with this. There's a file in includes/languages/english called header.php and it contains define('HEADER_LOGO_WIDTH', '192px'); to set the width of the logo image. When I alter the dimensions and upload the file, nothing happens.
Just a bit more detail...altering the logo width in this file only changes the container or area for the image...It does not change the size of the image.

The actual image size remains the same unless you change this actual image size like in a graphic editor.

Hope that this along with seethrough's explanation assists in explaining why you did not see a difference