Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jun 2007
    Posts
    113
    Plugin Contributions
    0

    Default Setting up my override directories

    I have been trying to figure out template overrides, and I downloaded the chart from the download section that shows the overrides and it is really helpful and I think I am understanding it. I am using a template that I downloaded but have created directories for such things as the header, and the define pages, etc. into the new directories called "sage" because that is the template I am using.

    I went through and created a new sage directory in every location that was on the chart which appears to be basically everywhere that a classic directory exists. I notice that all those classic directories are empty. Am I supposed to put files into the new sage directories I created, or leave them empty to?

    For example /includes/modules/sideboxes contains several php files along with the directories classic and sage which are both empty. Am I supposed to copy all of those php files into the new directory I created? And if so, is the purpose of it just so to preserve the file structure when zen cart is updated?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Setting up my override directories

    You only need to copy files into your /sage/ folders if/when you modify them. The /classic/ folders are mainly markers; many of them do not have contents.

    A major purpose of the override folders is to identify which files you have modified. You will still need to merge any changes if an upgrade modifies the core file, but you can tell at a glance which files you need to compare and which ones you can ignore.

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

    Default Re: Setting up my override directories

    You should only put files that you've altered in your template overrides files.

    Example: I've downloaded the About Us contribution, and I want to use it to
    make several new pages w/links that will be in my Information sidebox.
    In order to do that, I'll need to alter the file includes/modules/sideboxes/information.php. I make my changes/additions to
    a copy of that file, and upload my information.php file to includes/modules/sideboxes/my_template. Now my changes are in place, and safe when it comes time to upgrade.

    The chart is to show you where you **may** make a custom template folder...a quick visual reference.

    Hope this helps. I know it took me quite a while to figure it out and understand
    it. You're doin' great!
    [FONT=Arial]Country Kitty Crafts[/FONT][FONT=Arial]
    [/FONT] [FONT=Garamond]
    [/FONT]

  4. #4
    Join Date
    Jun 2007
    Posts
    113
    Plugin Contributions
    0

    Default Re: Setting up my override directories

    Ok I think i get it. So it is ok that I just made all those directories and leave them empty as markers. When you say only to move files you've altered, does that mean files that you actually go into and edit the code, or files that may change automatically (such as if you make edits in the admin section). The reason I ask that is because if that happens, how do you know which files have been altered?

    As far as your example, when you changed the information.php, did you just copy that file only to your directory, or did you copy every file in the sideboxes directory into yours?

    Does it just automatically look for files in your custom template directory first and if it doesnt find anything, it uses the default?


    Thanks

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Setting up my override directories

    Yep, that's the way it works.

    You only copy the actual file you have edited into your template folder.
    Any files you edit in the Define Pages Editor will be saved in the default versions; you should copy all of those to /your_template/, and then future changes in the Define Pages Editor will be saved to your template version.

  6. #6
    Join Date
    Apr 2004
    Location
    new mexico usa
    Posts
    27
    Plugin Contributions
    0

    Default Re: Setting up my override directories

    this thread helps clears up the purpose of the many empty file directories for me too, thanks!

    i just went through and added directories for 4 templates. now need to go back through them and pull out any duplicate files.
    i found some questionable directory placements of sideboxes in "templates" rather then "modules" for download templates. moved the files to "modules>sideboxes>my_template"

    been up all night till i am cross-eyed as i cram on mods for future website in development.

    fashions

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Setting up my override directories

    Cross-check those files with /template_default/ ... there are supposed to be some files in /your_template/sideboxes/, and some filenames look like they ought to be in /modules/ but really do belong in /templates/....

  8. #8
    Join Date
    Apr 2004
    Location
    new mexico usa
    Posts
    27
    Plugin Contributions
    0

    Default Re: Setting up my override directories

    Quote Originally Posted by gjh42 View Post
    Cross-check those files with /template_default/ ... there are supposed to be some files in /your_template/sideboxes/, and some filenames look like they ought to be in /modules/ but really do belong in /templates/....
    am doing just that and came up with "html_header.php" in includes>templates>my_directory, and so far find no reference to that being there. now the question is where does it go? i'll keep digging till i hear otherwise.

    CSS FLyout header 1.4
    barebones template
    CSS_dropdown_menu
    Alternative header 1.1a

    fashions

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Setting up my override directories

    Take a distinctive snippet from your copy (one that would be the same in the original) and look that up in Tools > Developers Toolkit. Paste the snippet in the lower left box, select all files and search.
    That will show you where else the file exists.

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Setting up my override directories

    /includes/templates/your_template/common/html_header.php

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Setting locale in template-override directory
    By lat9 in forum Addon Language Packs
    Replies: 1
    Last Post: 23 Mar 2013, 11:56 PM
  2. Setting up override files??
    By symon in forum General Questions
    Replies: 10
    Last Post: 13 Jul 2010, 05:01 AM
  3. Am I (trying to) override the override?
    By Green333 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 11 Sep 2008, 11:43 PM
  4. How to override a padding setting
    By JackA in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 2 Jan 2008, 08:11 PM

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