Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Documentation on the Override System

Documentation on the Override System

Sticky

Views: 74,842

Results 1 to 20 of 41
5 Feb 2007, 5:03 PM
#2
putzmeister avatar

putzmeister

New Zenner

Join Date:
Feb 2007
Location:
I currently reside in Northern New Jersey, USA.
Posts:
6
Plugin Contributions:
0

Re: Documentation on the Override System

Dr Byte,

I all in favor of a reference book that was written by a programmer/writer and not anyone else.

I have a question about the override system, as I fear either I don't understand fully or it doesn't always work.

background scenario:

There was a path:
../includes/templates/template_default/images/logo.gif

there is now also a path:
../includes/template/CUSTOM/images/logo.gif

The logo.gif in the CUSTOM directory was different from the one the in the template_default directory but would not be displayed. it was not until I changed the image in the template_default/images directory that the correct image was displayed in the header.

Is there something missing in the .PHP?

5 Feb 2007, 11:34 PM
#3
bmhayes avatar

bmhayes

New Zenner

Join Date:
Nov 2005
Location:
Missouri
Posts:
34
Plugin Contributions:
0

Re: Documentation on the Override System

If your template is setup correctly you will be able to switch your CUSTOM template on in ADMIN > TOOLS > TEMPLATE SELECTION.

In this section it will have a list of the templates installed as well as the active template.

If you have not turned your custom template on you will not be accessing your overrides. That is probably why you are seeing the original logo and not your new custom one.

7 Feb 2007, 1:53 AM
#4
putzmeister avatar

putzmeister

New Zenner

Join Date:
Feb 2007
Location:
I currently reside in Northern New Jersey, USA.
Posts:
6
Plugin Contributions:
0

Re: Documentation on the Override System

Thanks bm,

My template is set up fine. You wouldn't recognize the pages anymore.
This is the only problem I'm having right now.
It wouldn't be a problem if, really, if I weren't such a perfectionist.

The View Source shows clearly:

<img src="includes/templates/template_default/images/iu_logo.png

that the PHP did not generate the image out of my CUSTOM directory.

It should come out as follows, but unfortunately it doesn't.

<img src="includes/templates/CUSTOM/images/iu_logo.png

7 Feb 2007, 2:23 AM
#5
bmhayes avatar

bmhayes

New Zenner

Join Date:
Nov 2005
Location:
Missouri
Posts:
34
Plugin Contributions:
0

Re: Documentation on the Override System

This is probably what you have in
/includes/languages/english/CUSTOM/header.php

Line #24 : define('HEADER_LOGO_IMAGE', 'logo.gif');

It may help to change line #24 to

define('HEADER_LOGO_IMAGE', 'iu_logo.png');

8 Feb 2007, 1:11 PM
#6
putzmeister avatar

putzmeister

New Zenner

Join Date:
Feb 2007
Location:
I currently reside in Northern New Jersey, USA.
Posts:
6
Plugin Contributions:
0

Re: Documentation on the Override System

Right you are, I do have a:

/includes/languages/english/CUSTOM/header.php

However, the contents of that file is:

<?php /** * @package languageDefines * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: header.php 2940 2006-02-02 04:29:05Z drbyte $ */ // header text in includes/header.php define('HEADER_TITLE_CREATE_ACCOUNT', 'Create Account'); define('HEADER_TITLE_MY_ACCOUNT', 'My Account'); define('HEADER_TITLE_CART_CONTENTS', 'Shopping Cart'); define('HEADER_TITLE_CHECKOUT', 'Checkout'); define('HEADER_TITLE_TOP', 'Top'); define('HEADER_TITLE_CATALOG', 'Home'); define('HEADER_TITLE_LOGOFF', 'Log Out'); define('HEADER_TITLE_LOGIN', 'Log In'); // added defines for header alt and text define('HEADER_ALT_TEXT', 'IntimateU - Lingerie, Hosiery, Costumes, Leather & Lace, and more...'); define('HEADER_SALES_TEXT', ''); define('HEADER_LOGO_WIDTH', '277px'); define('HEADER_LOGO_HEIGHT', '57px'); define('HEADER_LOGO_IMAGE', 'iu_logo.png'); // header Search Button/Box Search Button define('HEADER_SEARCH_BUTTON','Search'); define('HEADER_SEARCH_DEFAULT_TEXT', 'Search keywords...'); ?>

As you can see, the HEADER_LOGO_IMAGE is correctly defined.
But still, if I rename the file in the template_default/images directory, the image will not be found. Something is broken.

Why does, what seems like, straight forward processes have to be chopped up into hundreds of disparate bits and pieces that make it impossible to see the big picture? Why? Why? Why, does this have to be so difficult? Why did the default template have so much crap that I had to throw away 75% of it to have a more functional experience. Haven't you ever heard of the expression "less is more".

This forum approach is not very productive, is there a reference book written by someone who can write, available?

Discouraged would be an understatement.

I was reading about GD2 to create thumb nails dynamically, because even if I did create three sized directories of images, I can't figure out what's supposed to read which directory, and how to get it to read the right directory and now I'm wondering where to put these directories.
Besides, I've been reading very many instances of people not being able to get the GD2 extension to work. Is this really going to happen.
The foolish notion that someone who can't code can create a professional looking website is a fool's delusion. :down:

9 Feb 2007, 5:37 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Documentation on the Override System

"...because even if I did create three sized directories of images, I can't figure out what's supposed to read which directory, and how to get it to read the right directory and now I'm wondering where to put these directories."

You already have the three directories: /images/, /images/med/ and /images/lrg/, for small, medium and large images respectively.
You can either use a mod like Image Handler 2 to take care of all of that, or upload the medium and large images directly to the right directories while using the standard product creation process to set the small images.
See the HOW-TO: Image Preparation thread in First Steps for more good info.

You don't need to tell the system how to do anything; just put the images in the right places with the right names and it will all work.

9 Apr 2008, 10:29 PM
#8
perelandra avatar

perelandra

New Zenner

Join Date:
Jun 2006
Posts:
12
Plugin Contributions:
0

Re: Documentation on the Override System

DrByte:

For information on the override system, see the wiki articles starting here:
http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates

spent way too much time trying to find concise and (more importantly!) up-to-date information on the current status of the override system... that I can trust to be true and accurate.

I'd simply like to have a directory tree, or a list of dir names for which overrides work, including admin section that is current, i.e. valid for 1.3.8a. It appears there have been additional override dir's added or enabled but info in wiki seems inconsistent and I fear dated (but have no way of knowing ;-)

If there haven't been any changes since the overrides chart in the downloads section, then so be it... and I'll just crawl back to upgrade hell... <g>

Thanks so much,

pere

9 Apr 2008, 10:50 PM
#9
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Documentation on the Override System

perelandra:

spent way too much time trying to find concise and (more importantly!) up-to-date information on the current status of the override system... that I can trust to be true and accurate.

I'd simply like to have a directory tree, or a list of dir names for which overrides work, including admin section that is current, i.e. valid for 1.3.8a. It appears there have been additional override dir's added or enabled but info in wiki seems inconsistent and I fear dated (but have no way of knowing ;-)

If there haven't been any changes since the overrides chart in the downloads section, then so be it... and I'll just crawl back to upgrade hell... <g>

Thanks so much,

pere

This article may help.

There are no overrides for the admin section

10 Apr 2008, 3:36 AM
#10
tshooters avatar

tshooters

Totally Zenned

Join Date:
Dec 2005
Posts:
1,037
Plugin Contributions:
2

Re: Documentation on the Override System

Also, if you're upgrading...check the changelog files in the docs folder of
the Zen Cart distribution against the override chart for possible changes to template files. That will help you narrow it down a lot!

24 Apr 2008, 12:46 AM
#11
doneinstyle avatar

doneinstyle

New Zenner

Join Date:
Jan 2008
Posts:
2
Plugin Contributions:
0

Re: Documentation on the Override System

In reading through stuff on templating many people point here:
http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates

Well, have any of you tried clicking on any of the links down at the bottom lately? The "quick links"??? Lotta "you can't get there from here" going on. And the link to "notify the administrator" doesn't seem to do anything.

25 Apr 2008, 7:15 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Documentation on the Override System

doneinstyle:

In reading through stuff on templating many people point here:
http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates

Well, have any of you tried clicking on any of the links down at the bottom lately? The "quick links"??? Lotta "you can't get there from here" going on. And the link to "notify the administrator" doesn't seem to do anything.

The links have been updated.

25 Jun 2008, 7:47 PM
#13
spinningsinglewing avatar

spinningsinglewing

New Zenner

Join Date:
Jun 2008
Posts:
2
Plugin Contributions:
0

Re: Documentation on the Override System

I am sorry for this question, but I am at my wits end and can not figure it out. I need to change the "Congratulations you have installed..." and I have read the post and read the faq's but do not for the life of me know where to go to open the includes/languages/ENGLISH/index.php file . If anyone can tell me how to do this I would really appreciate the help.

25 Jun 2008, 8:24 PM
#14
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Documentation on the Override System

Presuming you read this article:

https://www.zen-cart.com/tutorials/index.php?article=129

You would need to edit the file on your computer then upload the changed file to your Hosting account; replacing the file that is there with your new one.

26 Jun 2008, 1:09 AM
#15
spinningsinglewing avatar

spinningsinglewing

New Zenner

Join Date:
Jun 2008
Posts:
2
Plugin Contributions:
0

Re: Documentation on the Override System

Yes I did read that article. I do not know where to go to edit the file and then upload it.

Thanks.

26 Jun 2008, 4:24 AM
#16
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Documentation on the Override System

Good site maintainence requires one to download their entire Hosting account onto their computer. This not only gives a backup of the site, in case anything happens with the hosting account, but allows one to edit files on their computer then upload the changed file. This means both, your computer files and hosting account files should pretty much be the same.

After downloading your files you would edit this file on your computer:
includes/languages/english/index.php

Save it on your computer like this:
includes/languages/english/your_template/index.php

Then upload the changed file to your Hosting account.

17 Jul 2008, 9:12 PM
#17
mista avatar

mista

New Zenner

Join Date:
Jul 2008
Posts:
10
Plugin Contributions:
0

Re: Documentation on the Override System

Website Rob:

Good site maintainence requires one to download their entire Hosting account onto their computer. This not only gives a backup of the site, in case anything happens with the hosting account, but allows one to edit files on their computer then upload the changed file. This means both, your computer files and hosting account files should pretty much be the same.

After downloading your files you would edit this file on your computer:
includes/languages/english/index.php

Save it on your computer like this:
includes/languages/english/your_template/index.php

Then upload the changed file to your Hosting account.

I'm having the same problem, i can't change the congratulations message. I downloaded the languages folder onto my hard drive and then create my custom folder called magic per the manual. I then edited the includes/languages/english/index.php file and uploaded it to my custom folder on my server and then went to refresh my store but the changes were not made. Am i missing something!?!?!

17 Jul 2008, 9:29 PM
#18
mista avatar

mista

New Zenner

Join Date:
Jul 2008
Posts:
10
Plugin Contributions:
0

Re: Documentation on the Override System

GRRRRR......i'm just crazy tired!!! I've been trying to solve this for an hour or so and its so stupid. I assumed the book "E-Start your webstore with Zen Cart" is correct on page 276. It tells you to edit the includes/languages/english/index.php and then upload it to your server at includes/languages/magic (magic=custom) but the online article (https://www.zen-cart.com/tutorials/index.php?article=129) which is correct tells you to put it in includes/languages/english/magic (CUSTOM)

and to think i spent money on this book, this is the third error i have found!!!! GRRRRR and i suck at searching through forums and really try not to double post so it took me a while just to find this thread!!!! Well hopefully this saves someone else the troubles i went through!!!

17 Jul 2008, 11:07 PM
#19
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: Documentation on the Override System

I apologize for any mistakes in the book.

Errata/Updates for the book can be found at the Cucumber Media site. They are accessed via the Book Support side-box. If you spot any errors, you can also send them to Book Feedback via the Contact Us page on that site.

With respect to the "error" you pointed out on pg 276. I have re-read that section and found that it is poorly worded and hence the confusion.

I should have expanded on the sentence "Find the file with the text you want to change and copy it to your override directory" from step 3 and incorporated it somewhere in step 2.

To determine which override directory to use, you can re-visit point 2.2 on page 271.

18 Jul 2008, 7:22 AM
#20
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Documentation on the Override System

Question RE: The Override System:

Both the manual and the FAQ, as well as the tutorials assume one is starting with a basic installation when setting up the Override System.

In addition to installing the cart, I've also installed a template. It is THAT template I want to customize (vs. creating an override for the Classic Template).

Question: How can setting up the Override System as instructed possibly affect the BareBones Template I want to customize since it's files are in an entirely different folder than the Classic & Template_default directories?

It seems to me that using the Override System as explained would have no effect on the Barebones Template that I'm trying to customize.

Question: Regarding these files in the BareBones Template Folder:

includes/templates/barebones/template_info.php
includes/templates/barebones/css/stylesheet.css
includes/templates/barebones/images/barebones_screenshot.png

Do I need to copy these files and/or folders into some place in my Override System and then dump the barebones folder altogether?

If so, where should I copy them to?

Would I copy them to:

includes/templates/<my template name>/
or
includes/templates/template_default/

And what about the includes/templates/classic/ director? Do I need to copy any of the barebones files or folders into that?

If so, where? Do I need to copy different pieces of it in to different places?

I'm very confused about the whole system. :blush:

Remember, my goal is to customize the barebones template, vs. the classic template.

Thanks in advance for the assistance!