Forums / Templates, Stylesheets, Page Layout / Override for includes/modules/pages?

Override for includes/modules/pages?

Locked
Results 1 to 15 of 15
This thread is locked. New replies are disabled.
31 Oct 2006, 22:20
#1
dbrewster avatar

dbrewster

Zen Follower

Join Date:
Jul 2005
Posts:
376
Plugin Contributions:
0

Override for includes/modules/pages?

Taking this upgrade opportunity to improve my grasp of the override system.

I did find this in the Wiki, but I am yet uncertain of its interpretation for my example below.

http://www.zen-cart.com/wiki/index.php/The_override_system_simplified


Wherever you see a folder named "classic" you can safely add your own /CUSTOM folder.

    modules
        classic
        CUSTOM


Does this mean that if I have a customization for the checkout confirmation page, I can do this:

includes/modules/[MY_CUSTOM_TEMPLATE]/pages/checkout_confirmation/header.php

?

Muchas gracias.

---Diana
31 Oct 2006, 23:08
#2
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,564
Plugin Contributions:
0

Re: Override for includes/modules/pages?

includes/modules/[MY_CUSTOM_TEMPLATE]/pages/checkout_confirmation/header.php


Sorry, no it does not.
31 Oct 2006, 23:16
#3
dbrewster avatar

dbrewster

Zen Follower

Join Date:
Jul 2005
Posts:
376
Plugin Contributions:
0

Re: Override for includes/modules/pages?

thanks for the speedy reply, Kim!

Saved me some bumbling-around time. :laugh:

---Diana
31 Oct 2006, 23:24
#4
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Override for includes/modules/pages?

Kim, are you saying the overrides can only be one level deep?

i.e.
/includes/modules/*.php
can be replaced in
/includes/modules/custom/*.php

and

/includes/modules/sideboxes/*.php
can be replaced in
/includes/modules/sideboxes/custom/*.php
31 Oct 2006, 23:39
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Override for includes/modules/pages?

In includes/modules/sideboxes, there's a "classic" directory. This is your clue that the directory can be overridden. The directory includes/modules/pages does not have a classic subdirectory and cannot be overridden, so be sure to make a backup of (and notes about) any files you change.

The things you can change in includes/modules/custom are files from includes/modules, such as column_left.php.

Good luck,
Scott
01 Nov 2006, 00:47
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Override for includes/modules/pages?

And do I understand correctly, 'template_default' is the exception to the rule?

i.e.
any file / dir. within the 'template_default' dir. can be copied over, or are we restricted to just 4: common, css, images, templates, and their subsequent files?
01 Nov 2006, 01:54
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Override for includes/modules/pages?

template_default is the baseline. Copy out of here into your own template and start modifying. This directory is overwritten every release, so you don't want to modify files in here.

Good luck,
Scott
01 Nov 2006, 15:00
#9
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Override for includes/modules/pages?

Nice chart, DrByte. Thanks for pointing it out. Don't think I would have found it otherwise. Hopefully, the downloads section will one day become searchable. :wink2:

The chart indicates that only 3 main directories are worked with for overrides.
includes - languages, modules, templates

Although the chart looks like it is/was part of something with more information on overrides, if I know the 3 above dir. are all I need to focus on then it definitely helps to focus on the required areas.

I find I'm asking a lot of questions on the override setup because I have not yet wrapped my head around its proper usage. Will be doing a CSS Template shortly that I would like to freely offer to others and that should answer a lot of questions as well. Don't know about others but completely understanding how the overrides setup works, is so very important and for many reasons.
26 Jan 2007, 16:13
#10
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
4

Re: Override for includes/modules/pages?

swguy:

. The directory includes/modules/pages does not have a classic subdirectory and cannot be overridden, so be sure to make a backup of (and notes about) any files you change.
Scott


Why is that ? I just came across this trying to be Zen-like and come to find I can't. Is there plans on using overrides here in the future?
27 Jan 2007, 15:19
#11
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Override for includes/modules/pages?

I have no earthly idea. But if you feel strongly - and it appears you do - put a note in the suggestions forum. Adding a donation might help it percolate up too.

Good luck,
Scott
27 Jan 2007, 15:30
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Override for includes/modules/pages?

qhome:

Is there plans on using overrides here in the future?


No .
27 Jan 2007, 15:45
#13
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Override for includes/modules/pages?

Well there's your answer!

What I do in cases like this is to keep a copy of the unchanged file as

<filename>.orig

Then when it comes time to upgrade, I can consult my notes AND search for *.orig to be sure I catch all the files that need manual merging.

Good luck,
Scott
27 Jan 2007, 15:48
#14
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
4

Re: Override for includes/modules/pages?

swguy:

Well there's your answer!

What I do in cases like this is to keep a copy of the unchanged file as

<filename>.orig

Then when it comes time to upgrade, I can consult my notes AND search for *.orig to be sure I catch all the files that need manual merging.

Good luck,
Scott


Ya i used to do that.. but now I find it easier to backup the new version... then after the upgrade overwrites my existing file, I can just merge it with a copy of my backup.
27 Jan 2007, 15:51
#15
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Override for includes/modules/pages?

Whatever works. The main thing is to have a system and keep a backup. In fact, I prefer several generations of backup (son, father, grandfather). You'll be glad you did!

Scott