Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / how to override includes > modules > pages > page_folder > header_php.php

how to override includes > modules > pages > page_folder > header_php.php

Locked

Views: 4,460

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
29 Jan 2008, 8:15 PM
#1
monkeytown avatar

monkeytown

New Zenner

Join Date:
Nov 2007
Posts:
78
Plugin Contributions:
0

how to override includes > modules > pages > page_folder > header_php.php

I have posted this in a different thread/section and it was answered (incorrectly?) or ignored. Anyway, I am looking at how to override the header_php.php file for a specific page. The file resides in modules>pages>page_name_folder>header_php.php. I have tried to add MY_TEMPLATE on each directory level with the new header_php.php file, but it never seems to be read. Can someone point me to where to put the new file so I can override it?

I have tried using (for the checkout_confirmation for instance)
includes\modules\MYTEMPLATE\pages\checkout_confirmation
includes\modules\pages\MYTEMPLATE\checkout_confirmation
includes\modules\pages\checkout_confirmation\MYTEMPLATE
includes\templates\MYTEMPLATE\checkout_confirmation

Any help is appreciated.

29 Jan 2008, 8:20 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how to override includes > modules > pages > page_folder > header_php.php

There is no officially-sanctioned way of over-riding these files in the current version of Zen Cart.

29 Jan 2008, 8:50 PM
#3
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: how to override includes > modules > pages > page_folder > header_php.php

As Kuroi has already said, the header_php.php files cannot be overridden using the template system. Your options are...

  1. Edit the file directly, be careful and keep a backup copy. Make notes because upgrades will overwrite your changes.
  2. Hook into a notifier used in the header_php.php file.
  3. Use a main_template_vars.php file if one does not already exist.
  4. Add the code to the template file instead of the header file.
  5. Create a new page and use it instead of the existing page.

Regards,
Christian.

1 Feb 2008, 4:45 PM
#4
monkeytown avatar

monkeytown

New Zenner

Join Date:
Nov 2007
Posts:
78
Plugin Contributions:
0

Re: how to override includes > modules > pages > page_folder > header_php.php

thanks for the tips :)