Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Get Along with the Override System

Get Along with the Override System

Locked

Views: 850

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
26 Oct 2009, 4:22 AM
#1
jaguarx avatar

jaguarx

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

Get Along with the Override System

This is a rather basic question - where should I keep my own files? But I believe it hurs my productivity. For examples I have many target html files invoked from define_main_pages.php but if I leave these files in the same folder as define_main_pages.php and they just can't be found. Image files are even worse. Do you have a rule I can simply apply to keep my files right places?

Warren

29 Oct 2009, 4:06 PM
#2
jaguarx avatar

jaguarx

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

Re: Get Along with the Override System

I'm working on my second commercial ZenCart based website. A lot of Javascrpt modules are used. I know you can't keep CSS styles in HTML files. But can I keep my Javascript modules in HTML files? Where should they be if not?

Warren

29 Oct 2009, 4:36 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Get Along with the Override System

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

Adding Extra Javascript to a specific page

31 Oct 2009, 8:20 PM
#5
jaguarx avatar

jaguarx

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

Re: Get Along with the Override System

I read about the file override system but stll have troubles with it. I changed includes/laguage/English/htem_include/classic\define_main_page.php. This file calls getprinters.php and other iages file. I have to to do try and error and place this file in the publuc_html folder to make it recognized. None of the Zencart subfolders can do the same. Where should this file be? My own CUSTOM folder? I have the same problems with image files. Please help.

Warren

1 Nov 2009, 2:14 AM
#6
jaguarx avatar

jaguarx

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

Re: Get Along with the Override System

I understand the need to take advantage of Zen Cart file override system. But doing it right seems to be a different story. I have two situiations that I need to talk about in a little more details:

1). I added some Javascript as well as HTML code to includes/langauge/english/html_includes/classic/define_main_page.php. These java scripts make requests to the server to run php files to return data from the data base. I'm really not sure the best spots for these files. By trial and errors, they ended up in the public/zencart which has 'includes' as one of the subfolders. Should I create

includes/langauge/english/html_includes/classic/CUSTOM or

includes/langauge/english/html_includes/CUSTOM/
for keeping these php files?

2). The includes/templates/CUSTOM/images is the good place for images files. But I also need to modify the reference to these files by adding oflder prefix. I just don't know which folder should be referred to as the 'current folder' in order to have the correct reference to image files?

Warren

1 Nov 2009, 2:45 AM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Get Along with the Override System

First, I suggest you do a search and read up on Overrides using the FAQ/tutorials link at top of this page?

Your custom template will use 'Your Template Name' for creating new directories wherever you see 'classic' dir. listed.

i.e.

includes/languages/YOUR_TEMPLATE/
includes/languages/english/YOUR_TEMPLATE/
includes/languages/english/html_includes/YOUR_TEMPLATE/

includes/templates/YOUR_TEMPLATE/

There is much to learn about using the Overrides, correctly & efficiently, so expect to take some time in doing so. :smile: