Forums / Templates, Stylesheets, Page Layout / Help! need help understanding override system

Help! need help understanding override system

Locked

Views: 4,663

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
16 Oct 2006, 3:49 AM
#1
jenbaby avatar

jenbaby

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Help! need help understanding override system

Hi - I like the classic template and just want to make changes to it. Is the custom template the actual override system? In other words must you create and load a customized template, to make any changes to any of the other templates, or can you change the classic template without creating and loading a custom template? I did at one time create a custom template and there were no colors or anything on screen. So I went back to classic and reloaded it but no changes were made.
I added custom folders in all the directories at an even directory level as classic as explained in the tutorial "The Override System really simplified" It says nothing about what files need to be in the Custom folder in the templates/ directory. Does there need to be any?
Or are they added say as needed when changes are made.
When I use the Tool developer kit it gives me one file to change the the sales message: header.php file.
Is there a document somewhere that lists associated files. For example when Sales message is changed a total of 2 files will be modified:
file one - path
file two - path
etc.
None of my overrides have worked with the instructions. I feel that I am not changing all the appropriate files because I don't know they need to be modified.

The overrides I would like to make to the classic template are:
Sales Message
Congratulations, Zen Cart Message
I have also tried overrides in the Define pages and had the same trouble. I would like to make changes to"
The main info page
Privacy and Conditions of Use
Shipping & Returns
Contact Us
And maybe a few others
When I change them and put them in the custom directory the overrides do not appear. HELP:down:

16 Oct 2006, 8:28 AM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Help! need help understanding override system

Check here in the tutorials:

https://www.zen-cart.com/tutorials/index.php?category=16

Answers to all the questions you have asked are there.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

16 Oct 2006, 9:10 AM
#3
jenbaby avatar

jenbaby

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Re: Help! need help understanding override system

Hi thank you for the link but I've gone over the tutorials yet again probably the 8th time and still no change.

With the Sales message I changed the header.php. Is this the only file I change?


// This section deals with the "home" page at the top level with no options/products selected
/Replace this text with the headline you would like for your shop. For example: 'Welcome to My SHOP!'/
define('HEADING_TITLE',' :wacko: ');
} elseif ($category_depth == 'nested') {
// This section deals with displaying a subcategory
/Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'/
define('HEADING_TITLE', ' :wacko: ');
}
Replace the text starting “Congratulations” with your own text. Make sure that the single quote marks are not left out.

With this one, I put the text by the smileys and still no go.

And the instructions below, is it just supposed to be the index.php?
What are the parenthasis and the rest of the line, should I be concerned with that? I don't understand the code. Is that stopping the override from working?

Save the edited file to includes/languages/ENGLISH/CUSTOM/index.php'); return false;" class="search_find">php and upload it to your server.

Do I need to load the custom stuff thru the tools - template selection and load?

Thank you really but I'm still confused, because I did what the instructions said and still no change with either the Zen Cart Congrats message and the Sales Message. I am really beginning to hate that Zen Cart first page.

16 Oct 2006, 12:56 PM
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Help! need help understanding override system

JenBaby:

Hi thank you for the link but I've gone over the tutorials yet again probably the 8th time and still no change.

With the Sales message I changed the header.php. Is this the only file I change?


// This section deals with the "home" page at the top level with no options/products selected
/Replace this text with the headline you would like for your shop. For example: 'Welcome to My SHOP!'/
define('HEADING_TITLE',' :wacko: ');
} elseif ($category_depth == 'nested') {
// This section deals with displaying a subcategory
/Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'/
define('HEADING_TITLE', ' :wacko: ');
}
Replace the text starting “Congratulations” with your own text. Make sure that the single quote marks are not left out.

With this one, I put the text by the smileys and still no go.

And the instructions below, is it just supposed to be the index.php?
What are the parenthasis and the rest of the line, should I be concerned with that? I don't understand the code. Is that stopping the override from working?

Save the edited file to includes/languages/ENGLISH/CUSTOM/index.php and upload it to your server.

Do I need to load the custom stuff thru the tools - template selection and load?

Thank you really but I'm still confused, because I did what the instructions said and still no change with either the Zen Cart Congrats message and the Sales Message. I am really beginning to hate that Zen Cart first page.

Yes It should be just index.php

Did you create a new custom template?

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

and upload that to your server.

If you didn't then zen cart won't know how to look for your changes.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

16 Oct 2006, 1:32 PM
#5
tshooters avatar

tshooters

Totally Zenned

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

Re: Help! need help understanding override system

HI! JenBaby!

I made up a chart so you can visualize where a custom (your template) folder
may be placed in the ZenCart includes/languages file structure. You can d/l it here
in the Downloads/Other Modules section and print it out:
Overrides Chart

An example:
If you wanted to change the "Congratulations!" message, you would copy the
includes/languages/english/index.php, make corrections and upload your new
index.php file to includes/languages/english/custom (your template) file.

Hope this helps! I know it took me quite a while to understand the overrides
system, and get it right.
:thumbsup:

16 Oct 2006, 1:54 PM
#6
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Help! need help understanding override system

TShooters

Check this out:

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

Great Minds ....

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

16 Oct 2006, 4:38 PM
#7
waveneybooks avatar

waveneybooks

New Zenner

Join Date:
Sep 2006
Location:
Suffolk, UK
Posts:
64
Plugin Contributions:
0

Re: Help! need help understanding override system

TShooters:

HI! JenBaby!

I made up a chart so you can visualize where a custom (your template) folder
may be placed in the ZenCart includes/languages file structure. You can d/l it here
in the Downloads/Other Modules section and print it out:
Overrides Chart

I've helped myself to this, hope you don't mind :unsure:
It's really helpful to us newbies.
T-shooters helps me again! Thank you.
Slowly, but surely, becoming totally Zenned, Tina

16 Oct 2006, 6:58 PM
#8
jenbaby avatar

jenbaby

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Re: Help! need help understanding override system

Thank you. That is the greatest chart ever. Makes more sense than anything. I saw that in the tutorial and did that before I tried the overrides. Each of my custom folders has the custom copies of the changed files in it. but the ZEN CART message and sales message still comes up. (Ugh!!!).

What I'm wondering is, in the templates/custom directory is there any files that I need in there other than the ones I'm changing and do I need to load it in the tools - template section. Or is that just for a complete custom template of my own. When I first looked at custom templates it said something about copying files from the templat_default directory. Is that just for a custom templates which is a total replacement for say the classic template or is that also part of the override system. In other words I would need some of the template_files not directly associated with the files containing the actual changed data.

I saw in another post, someone gave advice on a file that I did not even know was associated with the file being changed, some sort of tpl file or is there only one file for each thing being changed.

Through the developers tool kit I get the main files like header.php and index.php but are there any associated files?

If anyone knows I would truly be greatful. I'm sorry I have so much trouble understanding this. Thanks

16 Oct 2006, 7:17 PM
#9
jenbaby avatar

jenbaby

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Re: Help! need help understanding override system

Made a mistake -- template_file should read template_default. Sorry!

16 Oct 2006, 8:58 PM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help! need help understanding override system

ZenCart by default, when a template name is activated via the admin, looks first for files located in the override folders for that template, if none are found the default file is utilized.

So, only file that you edit should be placed in you template override folders.

Have you created a template? edited the template_info.php file to reflect that name? enabled it in the admin > tools > template selection? All these need to be done for the edited files to be found.

Zen-Venom Get Bitten

16 Oct 2006, 9:43 PM
#11
tshooters avatar

tshooters

Totally Zenned

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

Re: Help! need help understanding override system

Clyde,

That is too cool and will be a big help to newbies going thru the FAQ files. :thumbsup:

I see I've made a :oops: on my chart, as the common folder in the
templates shouldn't be listed. (Bad optical mouse! Bad! ...grabs it by it's tail and swings it around until it's red eye bugs out. )

You're welcome, Tina. Glad to be of help, and help yourself to the downloads.
Saw your site and it's lookin' gooood!

Good advice to you there from, Kobra, JenBaby! Hope you are seeing and
being able to choose your custom template from the templates list in
Admin/Tools/Templates. It won't show in the list unless you have your
customized template_info.php in your templates/custom folder.

16 Oct 2006, 11:10 PM
#12
jenbaby avatar

jenbaby

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Re: Help! need help understanding override system

Thank you Kobra I think I got it now. Thanks TShooter and every one else. It makes sense to me now.

The directory tree and Kobra's post make perfect sense together. Thank you so much I thought overriding and making a template were 2 completely separate functions. But now I get the correlation between the two.

I had the custom directory made but did not edit the template info file or load it in the Tool - template option. I thought you only needed to do that if you were making a custom template which I did not want.

Thanks again. :D :D :D

17 Oct 2006, 1:11 AM
#13
jenbaby avatar

jenbaby

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Re: Help! need help understanding override system

I got it! I got it! :D
I changed the Sale message and Zen Cart message, thanks

I got a pink and purple template and not the classic green but it's great!!!

17 Oct 2006, 1:20 AM
#14
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Help! need help understanding override system

Do you have a url for your site so we can take a look?

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Oct 2006, 9:25 PM
#15
jenbaby avatar

jenbaby

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Re: Help! need help understanding override system

Clyde , since I understood the override system I used gloss blue because the site is for my brothers band, I needed cool guy colors not pink!!! This will take you to the shop.

http://mindscheme.net/zencart/zen-cart-v1.3.5-full-fileset-09042006
I have to fix a paypal discrepancy before it goes live.

Eventually it will be accessed to the main page of the band web site under their new Halloween Rock Video link I think. Thanks for all your help.

I checked out Mystic Naturals, my favorite kind of stuff. I like your site.

18 Oct 2006, 9:40 PM
#16
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Help! need help understanding override system

Glad I could help.

Site. looks good.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

12 Dec 2006, 11:34 AM
#17
dudeshouse avatar

dudeshouse

New Zenner

Join Date:
Dec 2005
Location:
Portishead, UK
Posts:
32
Plugin Contributions:
0

Re: Help! need help understanding override system

I've also found this thread really helpful. I was trying the carpet bombing method of "let's try putting that file in here" before I found this map. Great work...

JenBaby, if you're happy to take advice from another newbie, maybe you should turn off the stock numbers for your items as one of them is showing 1e+08 Units in Stock. Just a thought...

I'll post on here somewhere when I've finished the site I'm working on...

...there is nothing worse than aggresive stupidity...

12 Dec 2006, 3:06 PM
#18
tshooters avatar

tshooters

Totally Zenned

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

Re: Help! need help understanding override system

That's great, dudeshouse! Now you're well on your way to Zendom. :clap:

Lookin' forward to seeing your new store. :thumbsup: