If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / need to override pages/account-*/ - how to?

need to override pages/account-*/ - how to?

Locked

Started by wdrwc on 22 Jul 2006, 7:32 PM · Views: 1,330

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
22 Jul 2006, 7:32 PM
#1
wdrwc avatar

wdrwc

New Zenner

Join Date:
Sep 2004
Posts:
13
Plugin Contributions:
0

Post #1 by wdrwc

I need to overwrite three header_php.php files in pages/account, account_history and account_history_info.
The manual says, there is currently no way to do that.

Is there any safe solution to the problem which will not complicate any future upgrades?

I also need to put some extra define statements for my class which define extra tables. I have also others which are language dependent. Where shall I put them?

Thanks for any advice,
wdrwc

22 Jul 2006, 10:12 PM
#2
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Post #2 by blindside

You're right, everything in includes/modules/pages is not overrideable (is that a real word? :blink: ) at this time. The best bet is to create a backup copy of the original file (e.g. name it "header.php.bak") for safe keeping. Then, clearly comment everywhere that you make changes in the file.

Here's a real-world example from my own website. This is from the header file for checkout_success. I needed some extra checks certain products:

// START Modified 5/10/2006
// Frank Koehl
// Membership processing needs to see this data on each order
//if ($flag_global_notifications != '1') {
if (true) {
  ...
}  // END if (true)
// END Modified 5/10/2006

This way, whenever I compare files for updates, the changes appear along with a clear explanation about what I did.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

23 Jul 2006, 12:11 AM
#3
wdrwc avatar

wdrwc

New Zenner

Join Date:
Sep 2004
Posts:
13
Plugin Contributions:
0

Post #3 by wdrwc

Simple but great idea. Changes easy to find.
Thanks,
wdrwc