Forums / Templates, Stylesheets, Page Layout / Can I override functions/html_output ?

Can I override functions/html_output ?

Locked

Views: 3,921

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
28 Aug 2006, 7:18 PM
#1
minnie_mouse avatar

minnie_mouse

Zen Follower

Join Date:
Jun 2005
Posts:
119
Plugin Contributions:
0

Can I override functions/html_output ?

hey does anyone know if this is possible... maybe i am doing it wrong.
i want to make changes to the html_output page (add a class to hidden fields). i copied it to functions/extra_funtions and uploaded and it returned an error message about duplicate php declarations.

do i need to make the changes directly to the original html_output file?

if so, if i upgrade will they get wiped out?

could i delete just the portion i need to change from the original file and make a new file called something else with just this function with my changes?

thanks so much!

it would be nice if there were a list somewhere of non-overrideable (is that a word) pages. i looked really hard through everything and couldnt find it.
MM

28 Aug 2006, 8:11 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Can I override functions/html_output ?

Minnie Mouse:

do i need to make the changes directly to the original html_output file?
changes to functions files must be done directly.

General rule of thumb: You can use an override folder wherever you see a "classic" folder in the original distribution 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.

28 Aug 2006, 8:35 PM
#3
minnie_mouse avatar

minnie_mouse

Zen Follower

Join Date:
Jun 2005
Posts:
119
Plugin Contributions:
0

Re: Can I override functions/html_output ?

so no luck...
i made the change in the original file and then created a readme to track changes to this file. then if i upgrade i can just do a search for the readme files and know which original files got changed...
thanks for answering.

28 Aug 2006, 10:55 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Can I override functions/html_output ?

Upgrading is a lot simpler if you use a "diff" program like WinMerge (winmerge.sf.net) to compare your current files vs "old originals" to identify your customizations. And then reproduce or merge your customizations into the new version using that information.

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

28 Aug 2006, 10:58 PM
#5
minnie_mouse avatar

minnie_mouse

Zen Follower

Join Date:
Jun 2005
Posts:
119
Plugin Contributions:
0

Re: Can I override functions/html_output ?

that's a good idea. i will do that. i like tracking things though anyway, then if i forget something i did have a record of changes...

1 Sep 2006, 7:38 AM
#6
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Can I override functions/html_output ?

Wondering what exactly you were looking to do (perhaps post some code?). I've found a lot of times when I thought I had to change the html_output file, only to find there was another way to do it - either through clever css or passing parameters from a template file.

Not always... there have been times I HAD to edit the core file... but many of the functions are more flexible then they first appear.

  • Steven
19 Aug 2008, 10:29 PM
#7
ok avatar

ok

New Zenner

Join Date:
Aug 2008
Location:
Oregon, United States
Posts:
6
Plugin Contributions:
0

Re: Can I override functions/html_output ?

So far, every occasion I have had to edit a function file has had to do with editing HTML markup.

Can anybody explain why HTML markup is added at the function level. For example zen_back_link() in "functions_general.php" has an anchor tag in the function.

Similar functions, for example the checkout button, which uses zen_href_link(), locates the markup in the template file which easy to override.

20 Aug 2008, 5:00 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Can I override functions/html_output ?

(ok):

So far, every occasion I have had to edit a function file has had to do with editing HTML markup.

Can anybody explain why HTML markup is added at the function level. For example zen_back_link() in "functions_general.php" has an anchor tag in the function.

Similar functions, for example the checkout button, which uses zen_href_link(), locates the markup in the template file which easy to override.

Yes, these matters are part of the improvements in the upcoming v1.4 release. More details on the release are posted in the Announcements and Roadmap areas of the forum.

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