For information on the override system, see these FAQ articles:
https://docs.zen-cart.com/user/first_steps/overrides/
https://docs.zen-cart.com/user/new_u...ics/overrides/
https://docs.zen-cart.com/user/templ...ate_overrides/
Printable View
For information on the override system, see these FAQ articles:
https://docs.zen-cart.com/user/first_steps/overrides/
https://docs.zen-cart.com/user/new_u...ics/overrides/
https://docs.zen-cart.com/user/templ...ate_overrides/
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?
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.
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
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');
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:
"...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.
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
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!