Forums / Templates, Stylesheets, Page Layout / Really really hard to customize - any easy hints?

Really really hard to customize - any easy hints?

Locked

Views: 4,026

Results 21 to 27 of 27
This thread is locked. New replies are disabled.
6 Apr 2007, 3:32 AM
#21
douglerner avatar

douglerner

New Zenner

Join Date:
Apr 2007
Posts:
71
Plugin Contributions:
0

Really really hard to customize - any easy hints?

TShooters:

Have you created a custom folder in includes/languages/english/html_includes/your_template_name,
and copied the define_***.php pages from html_includes to it that you intend to
customize/modify?

If so, when you open them in admin/tools/define pages editor, it should
say at the top above the edit box:
Editing file: ..../includes/languages/english/html_includes/your_custom_template/define_***.php

Thanks. That worked.

doug

6 Apr 2007, 5:24 AM
#22
douglerner avatar

douglerner

New Zenner

Join Date:
Apr 2007
Posts:
71
Plugin Contributions:
0

Re: Really really hard to customize - any easy hints?

afo:

Everyone starts out :blink: and :frusty:. Once you get the hang of it you'll wonder why you thought it was so difficult and you'll feel :smartalec: and :cool:.

To create a very basic custom template (you can build from there), you need:
includes/languages/YOUR_TEMPLATE/english.php
includes/languages/english/YOUR_TEMPLATE/index.php
includes/languages/english/YOUR_TEMPLATE/header.php (to change the logo)
includes/templates/YOUR_TEMPLATE/template_info.php
includes/templates/YOUR_TEMPLATE/common/tpl_header.php
includes/templates/YOUR_TEMPLATE/common/tpl_footer.php
includes/templates/YOUR_TEMPLATE/images/logo.gif
includes/templates/YOUR_TEMPLATE/css/stylesheet.css

Any where you see a /classic/ folder, you can create a folder for your custom template. You can copy the necessary files from either the /classic/ folder or the /template_default/ folder.

I recommend unzipping a copy of the latest ZC on your hard drive for two reasons.

  1. You can see the folder/file structure which will make things clearer
  2. You can edit files locally and FTP them to your site making an instant "backup"of your online store

ALWAYS use a good text editor like Notepad or Crimson Editor when working with ZC.

I found out what was causing that error before. In your instructions you mention there should be a

includes/languages/english/YOUR_TEMPLATE/index.php

file, but not where to get it from. I assumed it was the index.php at the top level of the store, but using that causes the error.

If you use the in includes/languages/english/index.php instead then it works fine.

doug

6 Apr 2007, 5:30 AM
#23
douglerner avatar

douglerner

New Zenner

Join Date:
Apr 2007
Posts:
71
Plugin Contributions:
0

Re: Really really hard to customize - any easy hints?

I think I figured out the basic philosophy of the override files. Correct me if I'm wrong:

In any directory (includes/languages, includes/languages/english, includes/templates) there are files. If you want to override any of those files, create a custom sub-directory (giving it the name of your custom template), copy the files from the parent directory into your custom directory and override them there.

Zen Cart will look first in the parent directory for a sub-directory with the name of your custom template. If it finds the required file in the custom directory it will use that file. Otherwise it will use the file from the parent directory.

Does that sound like the gist of it?

doug

6 Apr 2007, 7:59 AM
#24
gjh42 avatar

gjh42

Black Belt

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

Re: Really really hard to customize - any easy hints?

Very good statement of the override structure functionality.

Just one thing - some files are not overrideable even if you put a /custom/ folder in the right place. If there isn't a /classic/ folder there, overrides will not work.
Those are very few for the files most people need to edit.

6 Apr 2007, 9:45 AM
#25
drbyte avatar

drbyte

Sensei

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

Re: Really really hard to customize - any easy hints?

gjh42:

Just one thing - some files are not overrideable even if you put a /custom/ folder in the right place. If there isn't a /classic/ folder there, overrides will not work.
Those are very few for the files most people need to edit.

Exactly. Here's a handy reference:

DrByte:

Also, the Overrides Chart is a helpful reference:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=298

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

6 Apr 2007, 10:12 AM
#26
douglerner avatar

douglerner

New Zenner

Join Date:
Apr 2007
Posts:
71
Plugin Contributions:
0

Re: Really really hard to customize - any easy hints?

DrByte:

Exactly. Here's a handy reference:

For some reason I can't unzip that file.

doug