Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2010
    Posts
    133
    Plugin Contributions
    0

    Default Confusion about the override depth in a folder.

    I've been looking at updating my store to ZC v9.3.9h - and find that I may have really built a sand trap when I worked on the v1.3.8a code...When comparing the original store with the v1.3.8a files, WinMerge revealed that I have a number of override code that is in the files that will be updated by v1.3.9h...instead of being in the "custom" override folders. So, OK - I'll move the code t the "custom" folder and it'll be fine...right?

    Not quite.

    In reviewing the structure of the override system, I see that some of the files I modified are not in folders with a "classic" directory, as indicated in the tutorial as the "key" to if a file can be overridden. Or are they? Are the override operations on a single - or a multiple - basis?

    In other words, if I want to override the "/includes/languages/english.php" file, I can create a copy file - "/includes/languages/CUSTOM/english.php" - because there is a "classic" folder in the original folder.

    But what of the "/includes/templates/classic/css/stylesheet.css" file? It is in the "classic" folder, 2 levels down...I can make a "/includes/templates/CUSTOM/ css/" path with the "stylesheet.css" file copy, but does the override reach 2 levels down?

    And do I copy ALL of the "classic" folder over to "CUSTOM", or just copy the files I need to change?

    Finally, in the tutorials I see that I can use "template_default" like the "classic" sense - ie:"/includes/templates/template_default/templates/tpl_***.php" can be copied to "includes/templates/CUSTOM/templates/tpl_***.php"...so it would seem that the override does go more than one level...at least with the templates.

    Oh, and do I need to tell the override that it exists and should run the override code instead of the ZC code?

    Sorry to sound so confused, but really, I am! I wrote the code about a year ago, and basically got it working and went on to other things...now I am paying the price for that in having to relearn it all over.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Confusion about the override depth in a folder.

    You got it all

    only one level every where EXCEPT to template area

    In the template area the full structure of template_default is available and can be replicated in your template and then some

    The only thing that you need is to create folders in every tree where a classic already exists with the SAME name as your template
    The rest is automatic

    For any that are not overrideable(no classic), I leave the original and rename it with a different extention other than php
    like
    orders.php to orders.orig

    Then in a copy in the commented section at the top i place a term - kobra - in my case and what/why it was altered

    @ Edited by kobra - added XX functionality

    When you are3 to up grade then you can search all files for your term and obtain a list of all files that will be lost(always backup) during the upgrade and to compare to the file change log
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2010
    Posts
    133
    Plugin Contributions
    0

    Default Re: Confusion about the override depth in a folder.

    Quote Originally Posted by kobra View Post
    You got it all

    only one level every where EXCEPT to template area

    In the template area the full structure of template_default is available and can be replicated in your template and then some

    The only thing that you need is to create folders in every tree where a classic already exists with the SAME name as your template
    The rest is automatic

    For any that are not overrideable(no classic), I leave the original and rename it with a different extention other than php
    like
    orders.php to orders.orig

    Then in a copy in the commented section at the top i place a term - kobra - in my case and what/why it was altered

    @ Edited by kobra - added XX functionality

    When you are3 to up grade then you can search all files for your term and obtain a list of all files that will be lost(always backup) during the upgrade and to compare to the file change log
    OK, that helps.

    One level only for "classic" clones, all levels below a "template_default" item...That allowed me to clone the 13 "classic" files, and the 3 "template_default" items.

    The configure.php, database_tables.php, and english.php files I can carry over by making them read only.

    Now I go to the next step in the upgrade!

    Thanks.

    Oh, am I correct in understanding that using the name for the "CUSTOM" folders in the admin template selection is the only way the store knows which folders to use? Thus I can include more than one template system, using the one I want at the time I want it...

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

    Default Re: Confusion about the override depth in a folder.

    Oh, am I correct in understanding that using the name for the "CUSTOM" folders in the admin template selection is the only way the store knows which folders to use? Thus I can include more than one template system, using the one I want at the time I want it...
    That is correct. Admin template selection sets the override folder name to be used in the storefront.

  5. #5
    Join Date
    Jan 2010
    Posts
    133
    Plugin Contributions
    0

    Default Re: Confusion about the override depth in a folder.

    Quote Originally Posted by gjh42 View Post
    That is correct. Admin template selection sets the override folder name to be used in the storefront.
    Great! I wanted to change the name of the folders to something more appropriate than "MyFolder"...seemed like a good way at the time...but just changing them didn't seem to work. Now I know why.

    Thanks!

 

 

Similar Threads

  1. Admin Folder & The Override System?
    By Miff in forum General Questions
    Replies: 3
    Last Post: 29 Nov 2011, 10:45 PM
  2. is there an override folder for the admin pages too?
    By photoseller in forum General Questions
    Replies: 1
    Last Post: 2 Jul 2010, 07:59 AM
  3. confusion about override system
    By abdulmueid in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Jan 2010, 08:06 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