Page 1 of 2 12 LastLast
Results 1 to 10 of 40

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Idea or Suggestion Documentation on the Override System

    Last edited by swguy; 31 Mar 2020 at 12:18 PM.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

    help question 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?

  3. #3
    Join Date
    Nov 2005
    Location
    Missouri
    Posts
    37
    Plugin Contributions
    0

    Default 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.

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

    Default 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

  5. #5
    Join Date
    Nov 2005
    Location
    Missouri
    Posts
    37
    Plugin Contributions
    0

    Default 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');

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

    Default 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.

  7. #7
    Join Date
    Jun 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Documentation on the Override System

    Quote Originally Posted by DrByte View Post
    For information on the override system, see the wiki articles starting here:
    http://www.zen-cart.com/wiki/index.p...on_-_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

  8. #8
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Documentation on the Override System

    Quote Originally Posted by perelandra View Post
    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

  9. #9
    Join Date
    Dec 2005
    Posts
    1,059
    Plugin Contributions
    2

    Default 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!
    [FONT=Arial]Country Kitty Crafts[/FONT][FONT=Arial]
    [/FONT] [FONT=Garamond]
    [/FONT]

  10. #10
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: Documentation on the Override System

    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?
    The overall process of getting a page of content to display includes
    - examing the URL request
    - getting stuff from the database
    - assembling the HTML header
    - assembling the navigation bar
    - assembling links to images
    - assembling the on-page content
    - grabbing the language-dependant buttons and links
    - sending the page to thebrowser

    You have to do all of the database stuff before you send anything out to the browser, therefore stuff will be spread out through several parts of the code.

    A large number of blog and cart systems start sending HTML out to the browser before they have even decided which records to read from the database. Those systems are unable to send a proper 404 error when there is nothing in the database for the requested page number!

    ZenCart, like many other advanced web applications, is a very intricate system catering for a wide variety of e-comm needs, and for most people various functions and chunks of template will be discarded.

    Additionally, if the code were one long file it would be impossible to work on.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Upgrading and the override system
    By ardhill in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 8 Jun 2010, 11:53 AM
  2. I haven't used the override system... am I screwed??!
    By chudley in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 16 Sep 2009, 11:10 PM
  3. Did not use the Override System
    By res in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Aug 2008, 05:23 AM
  4. Please help me understand the override system.
    By angelicdezigns in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 9 Jul 2006, 06:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR