Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    109
    Plugin Contributions
    0

    Override Query Please

    Hi folks,

    Well, a friend of mine has managed to upgrade my site to 1.3.0.2 for me..yippee, bless him, and the test products still have their attributes there so thats a good thing. He did install the zc_gloss_blue template, but I found it hard to work with, and last night he changed it for me, and it is now called UK Template v1.

    But when my host originally set up zencart for me, there were 2 folders "classic" and "template_default", mine was set to template_default, I have tried to search for an answer to this but couldnt find any.

    In the WIKI it said files can be overridden only if the
    * The directory where the file resides holds a sub-directory named "Classic".
    * The current path includes "template_default" or a template directory, such as "classic". Eg. /includes/templates/template_default/common/

    So does that mean that because my folder is not named template_default, I wont be able to override the files?? Or would I have to rename the folder/template?

    Also, it says that not all files can be overridden, is there a list somewhere of exactly what files I should not be touching...lol..

    I am trying to get my head around this all still, so can you advise me if I am on the right lines here, before I actually touch anything..lol..I darnt edit any of the define pages yet either, as the

    I create folder called say "override_template" in shop>includes>templates on my server, on my pc, or on both ? and I include the following sub-folders, images, css, common and templates?

    Do I have to copy/ftp anything from UK Template v1 into any of these folders to start off with, or is it just when I have to edit a file, I copy it there first, then edit it, then ftp it back to where I got it from (UK Template v1) or into override_template.

    I have read the WIKI document on the override system, but I just couldnt work out if I have got the hang of it correctly.

    I hope I am making sense, but as I keep seeing this Note: you should always edit the files located in your current template override directory, Example: /languages/english/html_includes/. Be sure to make backups after changing your files. I dont want to start editing files until I am sure I have created a correct override folder.

    Thanks for your time.
    Kind Regards
    Nikki

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

    Default Re: Override Query Please

    Don't feel alone as this is either easy or almost impossible to grasp a handle on.

    If you understand the normal tree structure of a windows file system then this is no different. A couple of semi-visuals might assist(or not) : red is folders and blue is files;

    For the template directorythere is a classic folder that exists)
    Code:
    includes
         templates
              classic
              template_default
              Add your template folder here
    For languagesthere is a classic folder and only one file)
    Code:
    includes
         languages
              classic
              english
              Add your template folder here
                   english.php (file)
    For the english directory: (not all files listed)
    Code:
    includes
         languages
              english
                   classic
                   extra_definitions
                   html_includes
                   images
                   modules
                   Add your template folder here
                        account.php
                        account_edit.php
                        other files
    So basically any file that you might edit that exists in the same leg of the tree should be placed in the your template folder. There are other folders like html_includes that also have a classic folder and those files that exist under this folder can be edited and placed in the your template folder that you would create/add there.

    The one exception to the above is the templates folder. Here there is a classic folder but any file or folder and files that are in the template_default folder can be created in the your template folder(notice files and folders)

    I hope that this will not confuse you more, but helps??
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jun 2006
    Posts
    109
    Plugin Contributions
    0

    Default Re: Override Query Please

    Hiya Kobra,

    Thanks for the description. I understand now what folders need to be where, but just need to make sure I do things in the right order. If you click here
    http://i9.photobucket.com/albums/a56...zenfolders.jpg

    I have done a screen print of what template folders I have on my server and the sub folders of them. As you will see my original template set up by host "template_default" has quite a few subfolders in it, but the new one my friend installed only has the normal 4 folders installed, does that mean that some of the things wont work in it. I would ask my friend but he is fairly new to zencart himself and hadnt even heard of the override system. I didnt know whether I had to copy the other folders on template_default into my template I am using now. I also do not want files that do not need to be there cluttering things up, as I like organisation, and dont want to go and delete something that I shouldnt..lol.

    But it was worrying me that when talking about override system, people always talk about having the template_default folder as the default template, but this new one of mine isnt called that, I dont know whether that is ok, or whether it needs to be renamed or something.

    You said "So basically any file that you might edit that exists in the same leg of the tree should be placed in the your template folder." is that as soon as the folder is created I copy the files over before doing anything? or is it if and when I need to edit a file do I copy it over then.

    So if I understand correctly I want to create a new override folder, and when I make any ammendments at all I save the ammended copy to my override folder?

    Oooooooo I am sooooo confused..lol..

    It is soooo hard trying to type what I mean, I am much better at verbally explaining myself..lol.. I am totally pc confident, and extremely confident with file management, I think thats why I feel a bit useless...loll I feel like I am not making much sense so apologies if this is doing your heads in right now

    I have learnt sooooooo much other stuff from you guys, and once I get my head around the override system thinggy I should be well on my way, I never thought I would understand the attributes but I do now thanks to you lot.

    Thanks again, and so sorry for such the long post, id rather give you too much information that not enough
    Kind Regards
    Nikki

    This is my shop if you want a peep..its no where near finished though, need to amend the logo as the poor angel has had her feet chopped off...lol..
    www.angelic-dezigns.co.uk/shop

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Override Query Please

    Quote Originally Posted by angelicdezigns
    But it was worrying me that when talking about override system, people always talk about having the template_default folder as the default template, but this new one of mine isnt called that, I dont know whether that is ok, or whether it needs to be renamed or something.
    I think what they're trying to say in those discussions is that you should "use" the template_default files as a "base" from which to build any new template you make.... (as opposed to using "classic" as the base).

    You do NOT want your own template to be called "template_default" ... because that will conflict with the original/master files.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Override Query Please

    is that as soon as the folder is created I copy the files over before doing anything? or is it if and when I need to edit a file do I copy it over then.
    It is the latter; Only files that you edit go in the override folder....This will become aparent when and if you upgrade...as all the corefiles will be overritten and you will need to compare your old files to the new ones for a possible change...If you copy them all then you have to check them all....copy only the ones you edit and then there are very few that must be compared.

    I will attempt to para-phrase Ajeh on this: Zen Cart looks first to the current template folder for files if it is not found there it uses the default file. It is Zen Majik!
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jun 2006
    Posts
    109
    Plugin Contributions
    0

    Default Re: Override Query Please

    Thanks so much DrByte and Kobra, I have had a break away from my site for a few days, hopefully I have a clear head now.

    I think I may have got my head around this, I have read it over and over and I am sure no one else is this SLOWWW at picking it up..loll I have tried to explain how I think it I should set it up, I would just like someone to clarify that I am on the right track please.

    So basically I create a mirror image of my UK Template v1 folder with the folders that Kobra kindly illustrated in post 2 ’ with another folder called override_folder (on my server), but it is empty – no files are actually in it at the moment just the empty folders, and then when I make an amendment to a file I save it to my override _folder rather than UK Template v1 folder, or does it have to be saved to both?

    Do I then have identical folders on my pc, and when I make amendments I save to there aswell as override_folder

    So if I amend something in define page editor for example, does that mean I then go to /public_html/shop/includes/languages/english/html_includes/ and then copy that file into /public_html/shop/includes/languages/english/html_includes/override_folder/

    If I wanted to change any other file, I ftp it into the correct folder on my pc, edit it in dreamweaver, save the file, then ftp it back into my ‘override_folder’, or into my override_folder and my UK Template v1 folder?

    Is there any files that I should NOT touch..loll

    Please God, let me be on the right track this time..lol

    Once again, thanks so much for your kindness and patience. I have to pop out now so will check back tomorrow.

    Kind Regards
    Nikki

 

 

Similar Threads

  1. need help with override system, please
    By Kruna in forum Templates, Stylesheets, Page Layout
    Replies: 30
    Last Post: 7 Apr 2011, 01:29 PM
  2. Help with Override System Please.........
    By bobb2 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Apr 2009, 02:07 PM
  3. Help writing a custom SQL query please
    By bodyjewelrystores in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 6 Feb 2008, 03:08 AM
  4. Override, help please
    By godspeed27 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 27 Jul 2006, 02:55 PM
  5. Please help me understand the override system.
    By angelicdezigns in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 9 Jul 2006, 06:06 AM

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