Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Aug 2009
    Posts
    11
    Plugin Contributions
    0

    help question I haven't used the override system... am I screwed??!

    Ok so I have spent a few months building a nice site on my computer via xampp & localhost, and I'm happy with it and nearly ready to upload to a server and crack on until....

    I read about the Zen Cart Override system (something that until now I knew nothing about...my fault completely) and quickly realise that I haven't used this sytem AT ALL and have simply gone staight into the default zen files and edited their is this a huge no no??

    As for the site...(sorry I don't have a link yet as it's only on localhost at the moment) It works perfect as is and I haven't found any faults at all yet with the fuctionality of it... or at least I haven't found any faults on my localhost site. Obviously I need to upload to a server to test everything fully - I know this.

    I really do feel like a bit of a numpty and I'm starting to feel like a few months work may well have gone down the toilet so I need to know:

    #1: What are the implications of not using the override system? #2: How bad is my problem?
    #3: How can I fix this problem?


    Thanks Guys n Gals I appreciate all and any responses

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: I haven't used the override system... am I screwed??!

    No... this is not a train smash, and it can be "corrected" reasonably easily.

    Follow the steps I give you in my NEXT post...

    (I'm just going to check a few things before I give you the procedure)...
    19 years a Zencart User

  3. #3
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: I haven't used the override system... am I screwed??!

    When i first did a zen cart shop, i didnt use the override system either ( i just didnt get it at first) but now i use it all the time.

    The problem not using the override system is that when there is updates or security patches to add to your site, you will need to be VERY careful when implementing these....otherwise you will override all of your work.

    The other great thing about the override system is that if you make chagnes to a file and use this system, if it breaks your site then its really easy to go back to the original!


    I think you really only have 2 options since you have finished your site now.....either start again and use the override system (probably not what you wanted to hear)

    OR

    stick with what you have done, put it down as a learning curve and just be very careful when updating etc.


    Hope that helps slightly, one of the support team will probably be able to offer some extra advice

    Scott

  4. #4
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: I haven't used the override system... am I screwed??!

    Cool, maybe schoolboy has a better solution :)

    (sory he hadnt posted when i began the first post)

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: I haven't used the override system... am I screwed??!

    No you're not screwed. It's repairable.

    What you need first is a good file compare programme. WinMerge is free. Then compare your version of the site to a fresh, unedited download to identify the changes that you have made.

    Then copy your changed versions to the over-ride positions in the clean code set.

    Finally, backup your original and then over-write it with the new version. Your original configure.php files will point to your existing database which won't need to change.

    If during this process you need advice as to where to place files in the over-ride system, post back to this thread.

    [Note: me too, started my post before seeing that Schoolboy was planning a response]
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: I haven't used the override system... am I screwed??!

    Cool, never thouught about using the winmerge to compare the and then move them to correct override place.....i even downloaded it when i first started zenning. Just havnt got around to playing with it

    You learn something new everyday on here :)

  7. #7
    Join Date
    Aug 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: I haven't used the override system... am I screwed??!

    Thanks for the replies already guys I really appreciate it.

    I eagerly await your procedure schoolboy

    One more question if you please: does the override system slow down zen cart?, as I understand that zen itself checks for a newer/custom version of the default file being requested, is this check made every time a page/file is requested thus slowing the site down or...?? (forgive me if this question doesn't really make sense...I'm no whizzo )

    Thanks once again.

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: I haven't used the override system... am I screwed??!

    I trust you are aware of how the over-ride process works?

    To summarise...

    1. To make zencart "customizable", the developers constructed an over-ride system which allows users to make customizations to the core code via a CUSTOM TEMPLATE.

    2. The over-rides system applies only to the store files (called "catalog" in zencart). There is no over-ride system for ADMIN.

    3. The over-ride system functions by creating a CUSTOM TEMPLATE, which will include files that are associated with TEMPLATES, LANGUAGES and MODULES.

    4. Zencart is shipped with CORE CODE FILES ( in their "default" folders - eg: template_default ), and a STANDARD TEMPLATE called "classic".

    5. After initial installation, a zencart store will use this "classic" template to render pages to a browser.

    6. Users are advised to create a CUSTOM template system as soon as possible, so that they can make desired changes to TEMPLATE, MODULE and LANGUAGE files - without editing the CORE FILES, or affecting the "classic" template.

    7. The reasons why it is important to leave CORE FILES and the "classic" template alone (not to edit them) are... problems can often be diagnosed more easily when reverting to classic template, after a custom template is installed... Future software upgrades will not over-write edited files in custom template folders, so you will not lose all your hard work when the time comes to upgrade software.

    -------------------------------------------------

    STEPS TO CREATE A CUSTOM FILE WHEN YOU'VE EDITED CORE FILES SUCH AS THOSE IN TEMPLATE_DEFAULT.

    1. Because zencart initially uses the "classic" template, (which is largely empty of modified files when installed), an initial installation will use the CORE files in their DEFAULT folders. However, there are a couple of files in "classic" that are loaded up on initial installation and these are the css files and image files associated with classic template.

    So, If you have changes the css files and/or image files in the "classic" template folder, these must also then become part of your new template.

    2. download and print out a copy of the OVERRIDES CHART...
    http://www.zen-cart.com/index.php?ma...roducts_id=298

    3. Look carefully at the overrides chart. Your NEW template must contain a folder at any directory level where you see a "classic" folder.

    4. You MUST work on a COPY of all the software. So, using standard MS tools, create a complete copy of ALL the files relating to your ZC installation. It is NOT necessary to copy the DATABASE. Put this "copy" of your webshop into a new folder, named to alert you to the fact that it is the COPY... (You don't want to mix up your COPIED files with the ORIGINAL files !!!)

    5. From this point, work only with the COPIED files.

    6. Use the over-rides chart to seek out all "classic" folders, and RE-NAME them to your new template's name. For the purposes of this exercise, I call them " my_new_template "

    7. When you have re-named ALL "classic" folders to "my_new_template", open the following file for editing:

    includes/templates/my_new_template/template_info.php

    The code will probably look something like this:
    PHP Code:
    <?php
    /**
     * Template Information File
     *
     * @package templateSystem
     * @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: template_info.php 4226 2006-08-24 02:23:25Z drbyte $
     */
    $template_name 'Classic Contemporary Green';
    $template_version 'Version 1.3.5';
    $template_author 'Zen Cart Team (c) 2006';
    $template_description 'This template set is designed to be easily modified using only the style sheet to change colors, fonts, and the store logo. Three images are required; logo.jpg, header_bg.jpg, and tile_back.gif.';
    $template_screenshot 'scr_template_default.jpg';
    ?>
    change it to look something like this:
    PHP Code:
    <?php
    /**
     * Template Information File
     *
     * @package templateSystem
     * @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: template_info.php 4226 2006-08-24 02:23:25Z drbyte $
     */
    $template_name 'my_new_template';
    $template_version 'Version 1.0';
    $template_author 'Me - I am the author';
    $template_description 'This is my template and it is called my_new_template.';
    $template_screenshot '';
    ?>
    ... naturally, put whatever description is appropriate, etc.

    SAVE the file and close it.

    8. Now, if as you say, you have been editing CORE files, then you must now identify all the files you edited in the following general locations: templates, languages, and modules.

    9. For templates it will be quite easy... in a standard install, the only template files that govern processes are in includes/templates/template_default/

    So navigate to includes/templates/template_default/

    ... and COPY all the folders and files in that directory.

    ... then PASTE them into includes/templates/my_new_template

    This process will result in ALL template_default folders and files being copied into your new template folder - including files that you have NOT edited. This is not too serious. We'll look at how you can remove these un-edited files later. The point in doing it this way is to make absolutely sure that NO edited template files are over-looked. Rather have some that weren't edited, than omit some that were.

    10. You should now use WINMERGE (or similar reliable "file comparison" program) from the next steps. WINMERGE is a free file comparison tool that can be downloaded and installed on your computer. Please get this (or similar) and learn how to use it.

    11. Using WINMERGE, you must now find all files in the LANGUAGES and MODULES area of your copied zencart, that differ from their counterpart files in the standard ZC software. So you must have a full copy of the version of the zencart software you used, on your hard drive.

    Winmerge will compare YOUR files, with the files in an "un-touched" file-set. It will alert you to all files / folders that do not match.

    ALL files in your copy, that are shown NOT to match the ZC original, should be assumed to have been edited.

    You must now copy those "edited" files to their respective over-rides folder.

    FOR EXAMPLE...
    If your winmerge results show that the following files do not match...

    zc_original_files/includes/languages/english/checkout_confirmation.php
    my_copied_files/includes/languages/english/checkout_confirmation.php

    Then:
    my_copied_files/includes/languages/english/checkout_confirmation.php
    ... needs to be COPIED/MOVED to:
    my_copied_files/includes/languages/english/my_template/checkout_confirmation.php

    You should copy/move all changed files to their respective over-rides folders.


    12. Now, use WINMERGE to compare the following

    my_copied_files/includes/templates/my_new_template/

    my_copied_files/includes/templates/template_default/

    (Remember, in step 9 we COPIED everything... we did not MOVE it.)

    When the comparison results show, all files that are IDENTICAL in both directory trees can be removed (deleted) from
    my_copied_files/includes/templates/my_new_template/

    This will leave only your EDITED files, all now resident in the my_new_template structure.

    13. PLEASE NOTE that your customized defined pages may not be in the correct place. If you edited your define pages, and saved them to the "classic" folder, then you would already have re-named this folder to my_new_template, and no further action is necessary. However, if you did not (in the past) save your customized define pages to their "classic" folder, you must now copy those that reside in:

    my_copied_files/includes/languages/english/html_includes/
    to
    my_copied_files/includes/languages/english/my_new_template/html_includes/

    -----------------------------------------------------------

    When you are certain that ALL edited files are now safely resident in their proper over-rides folders, you can start the process of removing unnecessary files and folders from your COPIED set.

    Navigate to every directory level in your COPIED set where a my_new_template folder exists.

    LEAVE the "my_new_folder" and remove (delete) anything underneath it. BE CAREFUL HERE... The directory tree will have levels where a "my_new_folder" doesn't show (as it's a sub-folder)... DON'T delete without first checking to see if a my_new_template folder exists as a sub-folder!

    ----------------------------------------------------------------

    When this process is complete, you will have a copy of your custom template which can be now loaded onto a standard install of zencart.
    19 years a Zencart User

  9. #9
    Join Date
    Aug 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: I haven't used the override system... am I screwed??!

    Schoolboy, your a diamond!

    WOW I really wasn't expecting such a detailed and helpful answer, Im truly grateful. Im going to make a start on fixing my override problem with the help of your fantastic guide tonight and I will keep you posted via this thread as to how it goes.

    Thank You

  10. #10
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: I haven't used the override system... am I screwed??!

    A small but SIGNIFICANT error in my earlier post...

    STEP 12...

    12. Now, use WINMERGE to compare the following

    my_copied_files/includes/templates/my_new_template/

    my_copied_files/includes/templates/template_default/

    (Remember, in step 9 we COPIED everything... we did not MOVE it.)

    When the comparison results show, all files that are IDENTICAL in both directory trees can be removed (deleted) from
    my_copied_files/includes/templates/my_new_template/

    This will leave only your EDITED files, all now resident in the my_new_template structure.
    Should read as follows:

    ----------------------------------------------------------------------------------------------------

    12. Now, use WINMERGE to compare the following

    my_copied_files/includes/templates/my_new_template/

    zc_original_files/includes/templates/template_default/

    (Remember, in step 9 we COPIED everything... we did not MOVE it.)

    When the comparison results show, all files that are IDENTICAL in both directory trees can be removed (deleted) from
    my_copied_files/includes/templates/my_new_template/

    This will leave only your EDITED files, all now resident in the my_new_template structure.


    ----------------------------------------------------------------------------------------------------
    19 years a Zencart User

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 The link you have used to enter the PayPal system contains an incorrectly formatted
    By nick02895 in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 9 Mar 2014, 07:58 PM
  2. Documentation on the Override System
    By DrByte in forum Templates, Stylesheets, Page Layout
    Replies: 39
    Last Post: 1 Dec 2013, 09:46 PM
  3. 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
  4. Did not use the Override System
    By res in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Aug 2008, 05:23 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