Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  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,444
    Plugin Contributions
    279

    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

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

    Default Re: Override Query 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?
    I am confused NOW!!!
    One set of folders per template only...meaning if in your includes/templates/ folder you have a template setup(one with a template_info.php file) and this folder is called UK template v1 then all other folders in other locations for this template are named the same.

    No need for a folder named override_folder.

    The common example given is if your store was seasonal, you could have say 4 templates; spring, summer, fall, & winter. The includes/templates/ folder would have a folder for each and in each of them would be the css, images, and other folders. Then around the remainder of the site there would be a folder for each where files had to be edited.

    So to start, refer back to post #2, and replace the term "Add your template folder here" with the name of your template.
    Is there any files that I should NOT touch
    There are NONE that can not be edited, but the template & override systems make upgrading easy. If there is a file that can not be placed in a template override folder(no "classic" folder at that location), I keep a note book of these files (should not be many if at all), so that I can manually check these when an upgrade is in order.

    On your PC you can arrange these as you see fit, but replicating the folder structure helps me keep this straight. What ever method for your PC that works for you.

    Hope that this is clear??? If not post back and we can go through it again.
    Zen-Venom Get Bitten

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

    Default Re: Override Query Please

    Ohh deary deary me...lol.. I certainly was on the wrong track wasn't I. Sorrry Kobra.

    I feel sooooo stupid, and am sorry for wasting your time and confusing you.

    I know Ive said this before, but I think the penny might have dropped, as I have read and reread all the info..lolll.. I will explain what I think it is, and hopefully I wont confuse you this time

    When zencart is first installed, there is just a classic folder, then when my host set up my shop they named the template "template_default" IS THIS THE OVERRIDE FOLDER??

    Then when my friend set up a new template "uktemplate" is that is now the override folder??

    I really really hope so, as I am sooooo frustrated I could cry..lol.. and being extremely pc literate, and expert in graphic design, I cant believe I was still getting it wrong. Could you please just clarify a couple of other things for me please.

    You said that The common example given is if your store was seasonal, you could have say 4 templates; spring, summer, fall, & winter. etc etc etc. I understand that fully now, and its a great idea, do I just create 4 folders named as the seasons, then copy everything from my uk template over into each of them?

    Then around the remainder of the site there would be a folder for each where files had to be edited. - I am not sure what you mean by 'around the remainder of the site" Sorrrrrry

    I think I was under the impression that when people said I MUST create an override folder of my shop they maybe didnt realise that my host had already set up a template called template_default, which actually WAS my override folder if I have got this right, and if I want to edit something I just ftp it from my server to pc, edit in dreamweaver, save it, and ftp it back to where I got it from?

    Also, in post #2 "For the english directory" it shows my .php files should be in /languages/english/uktemplate folder, but for some reason are here. http://i9.photobucket.com/albums/a56...zencartftp.jpg
    Which I think may be wrong.

    Well, I hope I am on the right lines now, as I am soon going to be too embarressed to ask any more questions..loll

    Once again, I really do appreciate your patience and advice Kobra, and I sincerely hope that I havent confused you and myself even more.

    Kind Regards
    Nikki

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

    Default Re: Override Query Please

    I just read a thread about something, and someone sort of answered something that helped.

    Re: get rid of the brackets that wrap the products options.
    You'll need to make an override copy of includes/modules/attributes.php by copying it to includes/modules/your_template/attributes.php

    Then edit that file: at about line 144 you'll see where the brackets are being placed around the attributes price


    So, I think I was right, that my uktemplate is actually my override folder, so does that mean that if I wanted to edit a certain file, I go to the classic folder to open it, copy it to my uktemplate folder, then edit it in dreamweaver?

    Just to let you know that this is what is in my classic folders to see if it looks right to you.

    My classic folder in /public_html/shop/includes/modules/ only has a .txt folder named empty in it.

    My classic folder in /public_html/shop/includes/languages/classic/ only has a .txt folder named empty in it.

    My classic folder in /public_html/shop/includes/templates/classic/ has 3 folders common, css and images and a file called template_info

    Its a pity you cant look at my site through ftp as you will know instantly if anything is out of place..lol..

    Just though this may help.
    Kind Regards
    Nikki

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

    Default Re: Override Query Please

    I hope that you have or are reading this from the first "sticky post" in this forum??wiki on Overrides

    Template_default and the files in it are part of the normal install and contain the core files that can be edited and placed in your template(override) folders. This is not a template that your host installed.
    Then when my friend set up a new template "uktemplate" is that is now the override folder??
    YES, but to double check go to the admin > tools > template selection > you should see uktemplate. If it is not the default, click it to make it the target, in the right box find the 'edit' button and click it, in the dropdown select uktemplate and update.

    If uktemplate is currently the default, skip the above.

    So when this is the default, it is also the name for all your override folders.
    Then around the remainder of the site there would be a folder for each where files had to be edited. - I am not sure what you mean by 'around the remainder of the site" Sorrrrrry
    In post #2, I tried to illustrate, the fact that there are several places where you will create and use a folder named uktemplate. These are at any place where there exists a classic folder in the tree. These are the "around the remainder of the site" or the other places where there is a classic folder in the tree...
    Also, in post #2 "For the english directory" it shows my .php files should be in /languages/english/uktemplate folder, but for some reason are here. http://i9.photobucket.com/albums/a56...zencartftp.jpg
    Which I think may be wrong.
    This snapshot is a good illustration...the files that you have pointed to are the files under english THAT if you require editing one or more of them, the edited copy(not the original) would be placed in the uktemplate folder that is there. Only place files that you have edited in the uktemplate folders.

    If you also navigate to this folder(includes/languages/english), and open the 'html_includes' folder you will see that there is a classic folder there also. One would create a uktemplate in this tree and copies of files that you edit are placed in this uktemplate folder.
    So, I think I was right, that my uktemplate is actually my override folder, so does that mean that if I wanted to edit a certain file, I go to the classic folder to open it, copy it to my uktemplate folder, then edit it in dreamweaver?
    Really close, but re-read the comments directly above from your screen shot. NOT the files in the classic folder, as you have determined, in some cases there are no files contained there. It is the files that exist in the tree WHERE a classic folder also exists that can be placed in your uktemplate folder and edited.

    I do not think that I missed any of your comments...
    Zen-Venom Get Bitten

 

 
Page 1 of 2 12 LastLast

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