Forums / Templates, Stylesheets, Page Layout / Repenting for not starting with overrides

Repenting for not starting with overrides

Views: 1,406

Results 1 to 13 of 13
4 Feb 2011, 1:27 AM
#1
igofresh avatar

igofresh

Zen Follower

Join Date:
Oct 2010
Posts:
149
Plugin Contributions:
0

Repenting for not starting with overrides

I have to admit it. I started with Classic and played to see if I could do what I wanted and now (8 mos later) I'm pretty happy with what Ive got. Then I finally get around to reading the Overrides tutorial.
Ooops...
My question is can I copy all 'classic' folders and rename them to 'CUSTOM' so I don't have to fear losing all on an upgrade?
Ive read about setting things up right from the start, but have not found a good answer on creating overrides after the fact.

History does not repeat itself but it does rhyme - Mark Twain

4 Feb 2011, 2:49 AM
#2
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Repenting for not starting with overrides

Yes, you can do that. You might want to weed through the files in each folder and only copy over the files that have changed. You should be able to tell by the dates. Copying all the files will be confusing when you upgrade.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

4 Feb 2011, 3:01 AM
#3
igofresh avatar

igofresh

Zen Follower

Join Date:
Oct 2010
Posts:
149
Plugin Contributions:
0

Re: Repenting for not starting with overrides

Could I just rename all folders called 'classic' to 'CUSTOM'?

History does not repeat itself but it does rhyme - Mark Twain

4 Feb 2011, 4:08 AM
#4
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Repenting for not starting with overrides

You can, but you'll complicate upgrading later. You're better off creating folders for your custom template and copying the files you changed into them.

Don't forget to create an includes/templates/YOUR_TEMPLATE/template_info.php to give your template identifying information so you'll recognize it in the admin under tools->template selection.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

4 Feb 2011, 7:13 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Repenting for not starting with overrides

All files that are in /classic/ need to be in any custom template based on it as well, as they are all changed from /template_default/, whether or not they are changed from the original /classic/ version.. So yes, you can copy or rename all /classic/ folders.

4 Feb 2011, 6:56 PM
#6
igofresh avatar

igofresh

Zen Follower

Join Date:
Oct 2010
Posts:
149
Plugin Contributions:
0

Re: Repenting for not starting with overrides

Good advise as usual. Thanks All!!

History does not repeat itself but it does rhyme - Mark Twain

4 Feb 2011, 8:52 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Repenting for not starting with overrides

Well ... if the file has not been customized, you are advised to not copy it to your custom template folder. The only exception here would be any CSS and JS 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.

4 Feb 2011, 8:56 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Repenting for not starting with overrides

But if you are making a template based on Classic, you need all /classic/ files, whether you change them from the /classic/ version or not, right?

Unchanged versions of /template_default/ files should definitely not go in a custom folder.

4 Feb 2011, 9:06 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Repenting for not starting with overrides

Hmmm ... ya ... sorry, I read thru the thread too quickly. You're right. "classic" is a pretty bare-bones example of a good starting point.

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

9 Nov 2013, 8:05 PM
#10
scuggler avatar

scuggler

New Zenner

Join Date:
Jan 2013
Location:
San Jose, CA
Posts:
15
Plugin Contributions:
0

Re: Repenting for not starting with overrides

Hi there, I know this thread is pretty old but I made the same mistake with the over ride system and I believe I have created my custom template the right way so far. My only problem is that I am missing all sideboxes and my search bar. I didn't modify these files so I have not copied them to my template but they are no longer displaying when I select my template. The search bar is just the site search and the sideboxes are categories, information, important links, and such. I'm working on a site that is not online yet so I can't post a link, I know it's helpful but I don't have one. Any suggestions will be greatly appreciated. I am still learning the over ride system so thank you for any help in advance.

9 Nov 2013, 8:15 PM
#12
scuggler avatar

scuggler

New Zenner

Join Date:
Jan 2013
Location:
San Jose, CA
Posts:
15
Plugin Contributions:
0

Re: Repenting for not starting with overrides

stevesh:

I'm going to guess you didn't go to Admin - Tools - Layout Boxes Controller and click on 'Reset' after selecting your template.

http://www.zen-cart.com/content.php?180-how-do-i-create-a-new-custom-template

Nail on the head. Thanks Stevesh!

9 Nov 2013, 8:56 PM
#13
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Repenting for not starting with overrides

I love the title of this thread. Like the old saying, "Code in haste, repent at leisure."

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.