Forums / Templates, Stylesheets, Page Layout / is there an override to includes/filenames.php?

is there an override to includes/filenames.php?

Locked

Started by r1ckster on 12 Sep 2007, 7:41 PM · Views: 5,178

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
12 Sep 2007, 7:41 PM
#1
r1ckster avatar

r1ckster

New Zenner

Join Date:
Aug 2007
Posts:
13
Plugin Contributions:
0

is there an override to includes/filenames.php?

i want to add new pages (ie. news, press releases, legal notice). doing this with EZpages is still not very clear to me. and additionally i see the disadvantage of having the content in database (limited by length of a blob field) and loosing it during resetup or move of the shop.

that's why i'd like to have such additional contents in files, i'd prefer an override solution.
but for adding files and building links by using zencarts internal addressing system i seem to need to edit the includes/filenames.php. this change would probably get lost during an update of the shop with a newer version.

any suggestions?

zen me!

12 Sep 2007, 7:49 PM
#2
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: is there an override to includes/filenames.php?

" i want to add new pages"
Go to download section, look for a mod called "about us", you can make any new page based on that mod.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

12 Sep 2007, 10:49 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: is there an override to includes/filenames.php?

R1ckster:

but for adding files and building links by using zencarts internal addressing system i seem to need to edit the includes/filenames.php. this change would probably get lost during an update of the shop with a newer version.

any suggestions?
In the case of filenames.php, you can create another "my_filenames.php" file in the /includes/extra_datafiles folder ... and just add to it any additional definitions you require.
You can do similarly for database_tables.php if necessary.

.
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.

13 Sep 2007, 7:31 AM
#4
r1ckster avatar

r1ckster

New Zenner

Join Date:
Aug 2007
Posts:
13
Plugin Contributions:
0

Re: is there an override to includes/filenames.php?

the about_us mod worked great and helped me to understand the override system much better. it makes use of the same modification as suggested by DrByte (added includes/extra_datafiles/about_us_filenames.php).
thank you both.

zen me!

13 Sep 2007, 10:55 AM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,735
Plugin Contributions:
56

Re: is there an override to includes/filenames.php?

If you anticipate adding multiple filenames, you will want to put all your defines in a single file and choose a more general name than about_us_filenames.php so that your changes are more self-documenting.

Good luck,
Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

19 Sep 2007, 10:41 PM
#6
r1ckster avatar

r1ckster

New Zenner

Join Date:
Aug 2007
Posts:
13
Plugin Contributions:
0

Re: is there an override to includes/filenames.php?

last question about this mod... is the about_us mod intended to appear in admin as editable page? i can use the about_us contents in the frontend but there is not option in page editor to edit the content by backend. surely i can edit it directly by hand but just for perfectness i'd prefer to have it in the admin as the other pages are.
did i do some mistake or does the about_us page really not appear in admin?

zen me!

19 Sep 2007, 10:46 PM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,735
Plugin Contributions:
56

Re: is there an override to includes/filenames.php?

Two part answer:

a) You could always edit ./includes/languages/english/html_includes/define_about_us.php in the defines page editor. Don't know if all your content would reside there, but if so, this would be one approach.

b) If you really need something editable from admin, maybe just use EZ Pages. Creating a page based on about_us is really for people who like to use text editors.

YMMV. Good luck,
Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

20 Sep 2007, 8:10 AM
#8
r1ckster avatar

r1ckster

New Zenner

Join Date:
Aug 2007
Posts:
13
Plugin Contributions:
0

Re: is there an override to includes/filenames.php?

Hello Scott

swguy:

a) You could always edit ./includes/languages/english/html_includes/define_about_us.php in the defines page editor.

that was what i was thinking too. but at the moment i can not select the about_us page there. that's why i was asking here what i could have missed when setting up the mod or where to register the page to be selectable in defines page editor.

zen me!

20 Sep 2007, 8:21 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: is there an override to includes/filenames.php?

Does the file exist there ?
(I mean ... did you create such a file and upload it via FTP?)

You'll probably also want another file of the same name in the subdirectory under html_includes that's named the same as your working template.

.
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.

20 Sep 2007, 9:43 AM
#10
r1ckster avatar

r1ckster

New Zenner

Join Date:
Aug 2007
Posts:
13
Plugin Contributions:
0

Re: is there an override to includes/filenames.php?

got it... the file define_about_us.php did exist but was placed in includes/languages/german/html_includes/MY_TEMPLATE/define_about_us.php

this was working in the frontend as the override system successfully displayed the content of this defined page.

i copied the file to
includes/languages/german/html_includes/define_about_us.php and now i can select it in define pages editor.

i just compared this structure to about_us mod and noticed that the mod uses the same file twice
includes/languages/german/html_includes/MY_TEMPLATE/define_about_us.php
includes/languages/german/html_includes/define_about_us.php

but i do not understand this redundancy as both files have the same content. by using the define pages editor i will edit includes/languages/german/html_includes/define_about_us.php
but it will always be overridden by includes/languages/german/html_includes/MY_TEMPLATE/define_about_us.php

on one hand i want to use the override system but on the other hand i want to make use of the page editor. but will the editor affect the override file also or is a change by define page editor senseless because i need to edit the override file by hand?

zen me!

20 Sep 2007, 9:51 AM
#11
r1ckster avatar

r1ckster

New Zenner

Join Date:
Aug 2007
Posts:
13
Plugin Contributions:
0

Re: is there an override to includes/filenames.php?

i just did a test and edited this content with page define editor. it seems that
includes/languages/german/html_includes/define_about_us.php is required for seeing the page in editors dropdown selection.
but the changes affect only the override file at
includes/languages/german/html_includes/MY_TEMPLATE/define_about_us.php.
is this correct?

i assume if i'd remove the override file then the changes will directly affect the file at includes/languages/german/html_includes/define_about_us.php. somehow confusing for the start but i think i understood so far for now.

zen me!