Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: functions/html_output overrides?

    Quote Originally Posted by 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.

  3. #3
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default Re: functions/html_output overrides?

    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.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: functions/html_output overrides?

    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.

  5. #5
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default Re: functions/html_output overrides?

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

  6. #6
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: functions/html_output overrides?

    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

  7. #7
    Join Date
    Aug 2008
    Location
    Oregon, United States
    Posts
    6
    Plugin Contributions
    0

    Default Re: functions/html_output overrides?

    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.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: functions/html_output overrides?

    Quote Originally Posted by (ok) View Post
    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.

 

 

Similar Threads

  1. v151 Plugin authors: Overrides of /includes/functions/html_output.php
    By lat9 in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 3 May 2014, 08:48 AM
  2. Replies: 1
    Last Post: 19 Oct 2010, 12:18 AM
  3. Overriding functions/html_output.php
    By kokuryu in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Mar 2009, 08:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR