Forums / Templates, Stylesheets, Page Layout / Override directory, it seems is not being looked at...

Override directory, it seems is not being looked at...

Locked

Views: 3,264

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
25 Nov 2007, 4:17 PM
#1
rginn avatar

rginn

New Zenner

Join Date:
Oct 2007
Posts:
19
Plugin Contributions:
0

Override directory, it seems is not being looked at...

Hi,

I have had another party create the override directories for me and I believe there is an issue and maybe someone can help. I am trying to edit the english.php file to change the title of a side box. Here is the directory structure.

In the includes/languages, I see the following folders/files.
classic (folder)
english (folder)
override(my custom folder)
english.php(editing this reflects my changes, not the one in the override folder)

In the override folder is an english.php file which I initially made my changes. The site did not reflect the changes. When I change the english.php file that is outside of the override folder my changes are reflected on the site.

I noticed that in the Admin tool, selecting Tools>>Template Selection, there exists only one template. After a little reading, and if I understand this correctly, a file must be edited before ZC recognizes that you have a custom override implemented.

I read that I need to copy the includes\templates\classic directory and rename the last folder classic, to override i.e includes\templates\override.

Then I believe I need to edit the template_info.php file to reflect the new template name. The issue is that the documentation does not tell you where to place the new folder structure. Even if I knew how to do that, there is something that does not seem right when I looking my existing folder structure at this level.

When looking at the includes\templates\classic folder, I see the following:

css(folder)
images(folder)
template_info.php

There does exist an override directory in includes\templates and the heirarchy at this level looks like this.

classic(folder)
override(my override folder)
template_default(folder)

Whe I look into the override folder, there is no template_info.php file but the following does exist.

buttons(folder)
common(folder)
css(folder)
images(folder)
popup_shipping_estimator(folder)
sideboxes(folder)
templates(folder)

Judging by the documentation, I am not seeing what I think I should be seeing here. I would think that at this level I should have seen the same thing that was in the classic folder above.

I know this may be a little difficult for someone to visualize, and I could be wrong since I am a novice, but I think there is a possibility that folder structure at this level may not have been implemeted correctly.

Just a little confused.

Regards
Bob Ginn

25 Nov 2007, 4:52 PM
#2
tshooters avatar

tshooters

Totally Zenned

Join Date:
Dec 2005
Posts:
1,037
Plugin Contributions:
2

Re: Override directory, it seems is not being looked at...

Have you found the tutorials on the override system in the Tut/FAQs?

https://www.zen-cart.com/tutorials/index.php?article=36

https://www.zen-cart.com/tutorials/index.php?article=230

https://www.zen-cart.com/tutorials/index.php?article=143

This last one is really helpful with a chart so you can visualize the file structure. Or, there's one in the downloads/other modules, overrides chart.

There does exist an override directory in includes\templates and the heirarchy at this level looks like this.

classic(folder)
override(my override folder)
template_default(folder)

All these folders are in your your includes/templates/your template directory?

It do sound, to quote one of the devs, "boogered up". :huh:

25 Nov 2007, 4:56 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Override directory, it seems is not being looked at...

There are two different folder structures for different areas of the template.

The /includes/languages/, /includes/modules/ area use the "stepdown" type of structure where an override folder is added to the default filepath just above the actual file (as you outlined above).

The /includes/templates/ area uses a parallel structure where the override is a sibling of /template_default/, not a child of it.
The template override file structure should look identical to the default file structure.

/classic/ is actually an override template, so that is why you use the location of /classic/ folders to guide placement of /your_template/ folders.

25 Nov 2007, 5:12 PM
#4
rginn avatar

rginn

New Zenner

Join Date:
Oct 2007
Posts:
19
Plugin Contributions:
0

Re: Override directory, it seems is not being looked at...

Hi, Yes. The heirarchy I have given is what it looks like. It seems for one that since the tool>>Template Selection in the Admin tool does not reflect another template i.e. Override, it wouldnt work even if the folder structure was correct. That is my guess. So, this in itself would seem to prevent the override folders from being used by ZC. Of course the other issue is whether or not the override folder structure in itself is correct.

Regards
Bob

25 Nov 2007, 5:29 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Override directory, it seems is not being looked at...

Before the correct folder structure does you any good, you need to edit template_info.php for your override template. That is what the admin uses to distinguish templates available. Have you done that yet?

25 Nov 2007, 7:54 PM
#6
rginn avatar

rginn

New Zenner

Join Date:
Oct 2007
Posts:
19
Plugin Contributions:
0

Re: Override directory, it seems is not being looked at...

Hi, I am trying to determine if they did this. Maybe you can help but it seems the folders are not right.

In the folder:
includes/templates

I have this:
classic (folder)
override (custom override folder)
template_default (folder)

I have this in the classic folder from above:
css (folder)
images (folder)
template_info.php

I have this in the override folder from above:
buttons
common
css
images
pop_shipping_estimator
sideboxes
templates

It seems that the override folder should have in it what the classic folder does.
This is where I am confused. It looks the the folder structure is out of whack.
I also do not see the template_info.php in the override folder.

Geez, why me. I guess I need to get with the developers and see what the issue is.

Bob

25 Nov 2007, 9:33 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Override directory, it seems is not being looked at...

The override folder is fine; it just needs the template_info.php file added to it and edited.

Once you do that, you will be able to see your template in admin Template Selection.

A thought: does the override folder have only files in its subfolders that have been edited, or is it a complete duplicate of /template_default/? There should never be files in override folders unless the file has custom edits. It doesn't hurt to have empty folders.

25 Nov 2007, 10:11 PM
#8
rginn avatar

rginn

New Zenner

Join Date:
Oct 2007
Posts:
19
Plugin Contributions:
0

Re: Override directory, it seems is not being looked at...

Hi Glenn,

Thanks for staying connected on this one, I appreciate it.
Ok that is a good question. They did give me a list of files they did edit, whether or not those files are the only ones in the override folder I cannot be sure. I guess I could look at the files they edited and try and run it down that way. Ok, so at least the folder structure is correct. I will see if I feel comfortable editing that file. Not sure exactly what needs to change but I will take a stab at it.

If there are other files in the override folder that do not belong, what will or can happen?

Thanks
Bob

25 Nov 2007, 10:28 PM
#9
rginn avatar

rginn

New Zenner

Join Date:
Oct 2007
Posts:
19
Plugin Contributions:
0

Re: Override directory, it seems is not being looked at...

Hi Glenn,

Well I copied the info file over and set the new name and in the Admin tool set it to that template. The site came up but was missing all the sidesboxes on both sides. The main stuff like contact us, about us, FAQ all seemed to work fine.

I have a question which I never did ask before on the forum.

Since every thing you do through the Admin is just db changes, what would not work that was changed via the admin tool, if you moved to a new template? In the case of the Define Pages or EZ Pages, it seems that the english.php controls the title bar caption and the titles in the sidebox, but the data I thought was in the db. Confused again.

Anyway, I lost the product menu, EZpages, information boxes, Search box, Reviews etc. I cant check the other sideboxes that come up during checkout, but I would assume they are not there neither. So, this doesnt seem like something I can correct through the admin. Any help would be appreciated. The issue now is a confidence issue with the developers. There are errors sometimes but this seems to be a lack of familiarity of ZenCart by the developers.

Thanks
Bob

25 Nov 2007, 10:28 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Override directory, it seems is not being looked at...

It doesn't really cause operational problems; it's more of an upgrade hassle.

The purpose of putting edited files in an override folder is partly to mark which file edits need to be merged with new file versions in an upgrade. If unedited files are in the override folder, it means wasted effort comparing them.

The only thing you really need to change in template_info.php is the template name. The rest is bonus.

OK, looks like you are making progress.
The next thing to do is reset the sideboxes in Tools > Layout Boxes Controller. (This is mentioned in various instructions for templates.)

25 Nov 2007, 10:32 PM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Override directory, it seems is not being looked at...

Define pages are actually files; ez-pages are stored in the database.

You should copy the define_xxxx.php files to your override folder, so that the Define Pages Editor will in future edit those instead of the default copies. This will make them safe from being overwritten in an upgrade.

26 Nov 2007, 1:57 AM
#12
rginn avatar

rginn

New Zenner

Join Date:
Oct 2007
Posts:
19
Plugin Contributions:
0

Re: Override directory, it seems is not being looked at...

Hi Glenn,

Thank you very much. It seems it is working. I redid the layout boxes and all seems to be working. Dont know what I would have done without you help. Thank you very much!

Kind Regards
Bob