Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Yet Another Overrides Question

    No, you should have 2 custom folders in the /includes/languages/ folder.
    1. includes/languages/piccadilly_posh (which contains a copy of english.php)
    2. includes/languages/english/piccadilly_posh (which contains your modified versions of any files in /includes/languages/english such as index.php, meta_tags.php and header.php)

  2. #2
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Re: Yet Another Overrides Question

    I finally understand. I only want to clear up the following:

    When I make changes to english.php do I modify the one in includes/languages/piccadilly_posh ONLY?

    I see a Classic folder in includes/languages/english/modules/order_total

    Should I make an overrides folder named piccadilly_posh in there? Same for Payment and Shipping folders.

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

    Default Re: Yet Another Overrides Question

    Quote Originally Posted by traytray View Post
    I finally understand. I only want to clear up the following:

    When I make changes to english.php do I modify the one in includes/languages/piccadilly_posh ONLY?
    Yes

    Quote Originally Posted by traytray View Post
    I see a Classic folder in includes/languages/english/modules/order_total

    Should I make an overrides folder named piccadilly_posh in there? Same for Payment and Shipping folders.
    Yes... but the folders are only used when you have a modified file to place into them. Your "custom" folders can be there, but can remain empty.

    QUICK TUTORIAL...

    Right now, here is your file structure for TEMPLATE FILES:

    includes/templates/classic/templates/

    includes/templates/piccadilly_posh/templates/

    includes/templates/template_default/templates/


    Lets say (for example) that you wanted to make changes to a file called "tpl_modules_create_account.php"

    The CORE FILE (original code file) is at:

    includes/templates/template_default/templates/tpl_modules_create_account.php

    So you COPY that file, by sending it FTP to your hard drive. It is GOOD PRACTICE to have a "mirrored copy" of your site's files on your hard drive).

    Once in your hard drive, you open it for editing and make the changes you require.

    Then, you FTP it to the CUSTOM folder, or OVER-RIDES folder, or to the "YOUR_TEMPLATE" folder (they are called all these names on this forum).

    So it will be sent to:

    includes/templates/piccadilly_posh/templates/tpl_modules_create_account.php

    The ORIGINAL FILE (which is UN-EDITED) still resides in its CORE FOLDER
    The EDITED FILE (which you have changed) now resides in the OVERRIDE FOLDER

    CORE: includes/templates/template_default/templates/tpl_modules_create_account.php
    CUSTOM:includes/templates/piccadilly_posh/templates/tpl_modules_create_account.php

    Now... zencart works out what file to use by looking for files FIRSLY in any "over-ride folder".

    If it finds the file in the over-ride folder, it will load and use that file.

    If it DOES NOT find a file in an over-ride folder, it then goes to the DEFAULT folder, and uses the original file.
    20 years a Zencart User

  4. #4
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Re: Yet Another Overrides Question

    Schoolboy, excellently explained. This shizzle is confusing, but I got it now!

  5. #5
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Yet Another Overrides Question

    Yes, that was a very clear explanation, schoolboy (not that I expected less!).

    traytray, when I started with Zen Cart the hardest concept for me was the overrides. It took me a while to get the idea straight in my head. Once I did, it seems so simple to me I wondered why I had such a difficult time figuring it out.

  6. #6
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Re: Yet Another Overrides Question

    AFO, overrides are really tough to get a handle on for us new kids, but with people like you and schoolboy around, we will master it!

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Yet Another Overrides Question

    FWIW, you might be interested in my documentation "Plugin" that identifies the various opportunities for overrides (not just templates): http://www.zen-cart.com/downloads.ph...le&id=1393%29;

 

 

Similar Threads

  1. Yet another Googlemaps question
    By mrcastle in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 May 2010, 10:11 PM
  2. Yet another SSL question..
    By Hazmat in forum Basic Configuration
    Replies: 4
    Last Post: 31 Oct 2007, 05:47 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