Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Clarification needed - use admin panel or use an override file???

Clarification needed - use admin panel or use an override file???

Locked

Views: 908

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
7 Jan 2010, 9:24 PM
#1
mokijo avatar

mokijo

New Zenner

Join Date:
Jan 2010
Posts:
4
Plugin Contributions:
0

Clarification needed - use admin panel or use an override file???

Hello Peeps,

New to the whole zencart way of doing things. Currently hacking together a site and needed to delete the search box from the header.

Looked for an answer here on the forums and found several threads advising that you should do so via the admin panel. So I did. Worked a treat.

Was poking around my source code with bugzilla but noticed that turning off the search box this way still left an empty <div> in its place.

I don't like unnecessary markup hiding in my page so went about deleting it's reference from the tpl_header.php in my custom folder. Problem solved.

My problem is this - Many of the faqs / tutorials advise removing elements like sidebars / boxes / other elements via the admin panel. Does this mean I'll end up with more needless elements lurcking in the page markup? If so, would it be better just to hack the corresponding php files and dump them in my custom folders?

Hope this makes sense.

Regards

Mokijo

7 Jan 2010, 9:47 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Clarification needed - use admin panel or use an override file???

People are going to have slightly different opinions about this.

The safest way of doing it is to work from admin and accept the empty div. Yes, we know that that is not ideal but it maintains the flexibility of the system.

If you feel comfortable altering the code then there is nothing inherently wrong with that. It is just that it is less reversible and the problem with an empty div is not a major one.

Sometimes alterations from admin will create redundant code. But many times the alteration happens in the PHP so that the alterations never appear in the html. For instance, unused sideboxes should not appear in the html.

So, I think the best advice is to leave it in there unless you feel confident and comfortable taking it out.:smile:

7 Jan 2010, 10:26 PM
#3
mokijo avatar

mokijo

New Zenner

Join Date:
Jan 2010
Posts:
4
Plugin Contributions:
0

Re: Clarification needed - use admin panel or use an override file???

Cheers for the advice Niccol!

I guess I'll try using the admin panel first and then check the the output to see if I can live with the html zen puts out. I'm guessing that ammendments made in the admin panel won't be overwritten with core updates???

actually, how does zen handle that? Oooh, now I am confused. Need to dig around the faq's a lil' more cos I'm not really up to date with how the system handles such things....

:bangin:

7 Jan 2010, 11:08 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Clarification needed - use admin panel or use an override file???

Admin settings are generally saved in the database, so are immune to overwriting during a file upgrade.

7 Jan 2010, 11:45 PM
#5
mokijo avatar

mokijo

New Zenner

Join Date:
Jan 2010
Posts:
4
Plugin Contributions:
0

Re: Clarification needed - use admin panel or use an override file???

... and to think I nearly chose a wordpress plugin for my ecommerce!

What won me over was the community behind zen.

ask a question, get a response!

Cheers gjh42, and thanks again niccol.

Much Love,

Mokijo

:hug: