Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Yet Another Overrides Question

    I've (finally) followed the chart and made CUSTOM folders everywhere I saw a CLASSIC folder. I have also made changes to some other folders. I think most of them are template related. I found some here:

    /includes/languages/piccadilly_posh/>english.php

    /includes/languages/english/piccadilly_posh>button_names.php

    /includes/template/template_default/css >stylesheet.css

    and I'm pretty sure there are others. Where would I put the CUSTOM folder when I don't have the CLASSIC folder as a guide?

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

    Default Re: Yet Another Overrides Question

    If you don't see a /classic folder, there is no override available in that area. On the rare occasions I find it necessary to make changes to core files, I create an override file anyway and keep a copy of my modified file in it. That way when I upgrade/update, I can find the changes I made and duplicate them.

    You shouldn't be creating a custom folder in the /template_default folder. You should create it at the level above that, so it would be includes/templates/piccadilly_posh/css/stylesheet.css

    includes/languages/piccadilly_posh/english.php and /includes/languages/english/piccadilly_posh>button_names.php apeear to be created corroctly.

    What are you trying to do that requires changing files where no override is available?
    Last edited by afo; 24 Oct 2012 at 01:13 PM.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

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

    Default Re: Yet Another Overrides Question

    This is what is inside my /includes/templates folder:

    classic
    custom
    includes
    piccadilly_posh
    template_default

    Two questions:

    1) Am I supposed to have an includes folder in there?

    2) When I make a change to /includes/templates/piccadilly_posh/css/stylesheet.css am I making the modifications directly to that stylesheet, or in the CUSTOM folder in the /includes/templates folder mentioned above?

    Thank You.

  4. #4
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Yet Another Overrides Question

    Quote Originally Posted by traytray View Post
    1) Am I supposed to have an includes folder in there?
    Nope.

    Quote Originally Posted by traytray View Post
    2) When I make a change to /includes/templates/piccadilly_posh/css/stylesheet.css am I making the modifications directly to that stylesheet, ...?
    Yes. Once you have your template folders in place, your edits go in them and only in them (unless you really must make a change to a core file.) So in general your changes would go in the files in your piccadilly_posh folders. And in this specific case, your stylesheet changes are done in your ../includes/templates/piccadilly_posh/css/stylesheet.css file.

    Rob

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

    Default Re: Yet Another Overrides Question

    Should I just delete that includes folder?

    You didn't say anything about the CUSTOM folder in includes/templates. Did you mean I should make changes to includes/templates/custom or DIRECTLY to the stylesheet?
    Last edited by traytray; 25 Oct 2012 at 01:49 AM.

  6. #6
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Yet Another Overrides Question

    Quote Originally Posted by traytray View Post
    Should I just delete that includes folder?
    That depends on why it's there. If it's there because you installed a mod by dragging the includes folder containing the mod into the templates folder by mistake, then you need to look in that includes folder to see which mod you need to reinstall correctly. Then you can delete it.

    Quote Originally Posted by traytray View Post
    You didn't say anything about the CUSTOM folder in includes/templates. Did you mean I should make changes to includes/templates/custom or DIRECTLY to the stylesheet?
    Within the templates folder the CUSTOM folder contains a template. The CLASSIC folder contains a template. The piccadilly_posh folder contains your template. (I assume that's why it's there.) Ignore the CUSTOM and CLASSIC folders and concentrate on the piccadilly_posh folder. When you have made your changes and selected the piccadilly_posh template in admin, Zen Cart will pay no attention to the CUSTOM or CLASSIC folders. It will get everything it needs from the piccadilly_posh folder (for the customized files) and the template_default folder (for any needed files that have not been customized.) If you have created folders named CUSTOM elsewhere in the file structure, but are going to use piccadilly_posh as your template, go and rename those other CUSTOM folders wherever they are to piccadilly_posh.

    The templates/overrides system is all explained by the experts in the FAQ.

    Rob
    Last edited by rstevenson; 25 Oct 2012 at 02:50 AM.

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

    Default Re: Yet Another Overrides Question

    You said:

    "If you have created folders named CUSTOM elsewhere in the file structure, but are going to use piccadilly_posh as your template, go and rename those other CUSTOM folders wherever they are to piccadilly_posh."

    So for example the CUSTOM folder I made in /includes/languages/english and named /custom_english should be changed to /piccadilly_posh_custom_english?

  8. #8
    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)
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  9. #9
    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.

  10. #10
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    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

 

 
Page 1 of 2 12 LastLast

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

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