Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    186
    Plugin Contributions
    0

    Default Override - Good Practices?

    The article titled,"Understanding the Override System," at https://www.zen-cart.com/tutorials/i...hp?article=230 states: "Remember only files which have been modified should be copied to your /CUSTOM directory. If you do not make modifications, then by default, Zen Cart™ will use the default file."

    My question has to do with the use of the word "should." What harm could come from it? Is there any downside to merely copying ALL the files that could be potentially modified to my /CUSTOM directories prior to implementing my customizations? This way I will know that all future cusomizations that I make will be stored in the /CUSTOM directories without having to check to see if one needs to be created for the specific case I happen to be working on at the time. Any thoughts, comments or corrections will be appreciated.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: Override - Good Practices?

    If you override everything, upgrading will be more difficult because:

    a) Once upgraded, you would have to re-override everything again, otherwise you would basically still have the previous version of Zen Cart.

    b) You won't easily know what you have actually customized so it will be hard to re-apply those same customizations to the new version.

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

    Default Re: Override - Good Practices?

    Have to agree with steven300 on this. The override system "should" only contain files that you have modified.

    Its a lot easier to know that I've modified only one or two files and only those files are in my CUSTOM folder. That way I only need to compare those two files against the same file(s) from the upgrade.

  4. #4
    Join Date
    May 2009
    Posts
    186
    Plugin Contributions
    0

    Default Re: Override - Good Practices?

    Thank you for helping with this. Hear are my thoughts. If I override everything, when it comes to upgrade time, it will be easy to know exactly what I have customized because prior to upgrade, I can use Winmerge (http://winmerge.org/) to identify the files in the /CUSTOM directories that have changed from their original default states by having Winmerge automatically compare them to the files in the original default (ie, /Classic) directories. So, I don’t see this as a problem. The advantage of the override everything approach for a newbie like me is that I will be 100% confident that all customizations and changes made through use of the admin console will be reflected in the files in the /Custom directories. If there is no increased performance overhead then this seems like a good idea. Also, this seems like an approach which is less prone to error on my part by inadvertently changing a parameter stored in an /Classic file via the admin console. Otherwise, prior to each and every change made via the admin console won’t I need to check to make sure that I had previously copied (overridden) the relevant file to the Custom directory?

  5. #5
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Override - Good Practices?

    The only files in a /custom/ folder that are changed via admin are those in the language/html_defines/custom folder when using the define pages editor. Everything else you change or modify via admin is done in the database, not in the files.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  6. #6
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Override - Good Practices?

    If your idea works for you, it's fine - shouldn't hurt anything.

    What a lot of people here do is to re-create the folder/file tree from their remote site on their local computer (just those folders which contain override folders). Then we edit those files locally, save them to the local tree, then upload them to the proper override folder on the remote server. That way, you always have a current set of changed files, in the proper folders, to refer to, even when upgrading.

 

 

Similar Threads

  1. v150 Looking for a good template source with good customer service!
    By sb12759 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 May 2012, 09:26 AM
  2. New to modding ZC- best practices?
    By BassFace in forum Contribution-Writing Guidelines
    Replies: 7
    Last Post: 5 Dec 2009, 02:04 AM
  3. Which directory to install - Good Practices
    By HOBOcs in forum General Questions
    Replies: 2
    Last Post: 22 Nov 2007, 05:54 PM
  4. Upgrade best practices
    By swguy in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 2 Nov 2006, 07:22 PM

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