Forums / Templates, Stylesheets, Page Layout / Using my own template

Using my own template

Locked

Started by vision2003 on 24 Jul 2008, 12:06 PM · Views: 2,487

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
24 Jul 2008, 12:06 PM
#1
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Using my own template

Hi,

I need some help with using my own template to create my online store.

Here's the template I've designed
ihost-websites.com/SINKBIZ

Here's my current template
http://www.sinkbiz.com
after following the directions for making a new template at: http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates_-_Create

Questions:

What's the easiest and quickest way to create my custom template?

Thanks

24 Jul 2008, 12:55 PM
#2
afo avatar

afo

Totally Zenned

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

Re: Using my own template

The first link (to the design) doesn't work, but creating a template for Zen Cart involves several files (depending on what you want to do) and images.

This list is a bit outdated, but it'll give you an idea where to start to create a very basic custom template (you can build from there):

  • includes/languages/YOUR_TEMPLATE/english.php
  • includes/languages/english/YOUR_TEMPLATE/index.php
  • includes/languages/english/YOUR_TEMPLATE/meta_tags.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

Anywhere 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, the /template_default/ folder or the parent folder.

Edit 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

24 Jul 2008, 2:21 PM
#3
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

Thanks afo...please clarify

Do I need to edit the php code of all the files you suggested (I hope not)?

Here's the exact design I want my store ot look like:
http://www.ihost-websites.com/SINKBIZ

Here's the beginning file structure I've created for my new zen cart template
from following: http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates_-_Create

They were copied over from the default template...was this the correct thing to do?

common
css
images
templates
template_info.php

Where do I go from here to achieve my original design?

24 Jul 2008, 2:28 PM
#4
afo avatar

afo

Totally Zenned

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

Re: Using my own template

First, go into the admin and turn off the right sideboxes. Start with admin->tools->layout boxes controller and configuration->layout settings.

Change the colors in includes/templates/YOUR_TEMPLATE/css/stylesheet.css.

Change the logo/header in includes/languages/english/YOUR_TEMPLATE/header.php.

Give your template a name (if you haven't already) in includes/templates/YOUR_TEMPLATE/template_info.php

After that, it depends on what you want to do. Refer to the list I posted because it'll give you clues on where some things are... aside from the clues that exist in the default templates.

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

24 Jul 2008, 4:17 PM
#5
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

Thanks Mary...I was hoping I could just use my own style sheet instead of editing theirs.

Where is the CSS code for changing the color for the right column?

24 Jul 2008, 7:26 PM
#6
afo avatar

afo

Totally Zenned

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

Re: Using my own template

Look for the following section in your stylesheet and change the color to whatever you want.

.sideBoxContent {
	background-color: #ffffff;
	padding: 0.4em;
	}

I suggest you get the Firefox browser with the web developer addon which will allow you to tinker with the stylesheet and see the results immediately (among other things). You'll need to save the changes separately and upload them to your site to make them permanent.

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

25 Jul 2008, 12:39 PM
#7
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

Thanks Mary..you're very helpful
I'm slowly getting there (see sinkbiz.com)

More questions:

  1. I wish to reduce the number of navigation bars (let me know if this is not a good idea)
    How do I remove/turn off the main top nav bar (ie hardware etc) since its already located in the sidebar?

  2. Remove ezpages nav bar?

  3. Remove login (next to home)? Is this link for multiple users?

Thanks

25 Jul 2008, 1:07 PM
#8
afo avatar

afo

Totally Zenned

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

Re: Using my own template

I think you can turn some of that off in the admin, but I'm not 100% certain.

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

25 Jul 2008, 2:28 PM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Using my own template

  1. Admin - Configuration - Layout Settings - Categories Tabs Menu ON/OFF

  2. I think you'll have to edit a template file for that.

  3. The login links to a page where existing customers can log in, and new customers can create an account. Zencart requires your customers to create an account in order to purchase products (unless you've installed one of the 'checkout without account' mods).

25 Jul 2008, 2:44 PM
#10
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

Thank you!

How do I turn off...

New products for July
Featured Products
Monthly Specials for July

I'd like to add a paragraph of text to the top of the page under Welcome
and display 4 of my most popular products

How do I do this..I couldn't find it in the tutorials?

25 Jul 2008, 3:23 PM
#11
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Using my own template

What appears on your index page is set in Admin - Cofiguration - Index Listing

Edit the define_main_page.php file in Admin - Tools - Define Pages Editor

25 Jul 2008, 3:47 PM
#12
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

Thanks for your patience

How do I turn off these values on the other pages

New products for July
Featured Products
Monthly Specials for July

If I want to add my own products should I remove all sample cats and products first?

25 Jul 2008, 3:58 PM
#13
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Using my own template

*How do I turn off these values on the other pages

New products for July
Featured Products
Monthly Specials for July*

That's the first part above.

Yes, I'd remove all the sample data first by going to Admin - Catalog - Categories/Products

25 Jul 2008, 4:18 PM
#14
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

Thank you

I set these listings to 0 in config- index listings but they still appear on other pages

Show New Products - below Product Listing
Show Featured Products - below Product Listing
Show Special Products - below Product Listing
Show Upcoming Products - below Product Listing

Please advise

25 Jul 2008, 4:22 PM
#15
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Using my own template

That would be the parts of Admin - Cofiguration - Index Listing that refer to 'below product listing'.

25 Jul 2008, 4:30 PM
#16
afo avatar

afo

Totally Zenned

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

Re: Using my own template

This article might help.

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

25 Jul 2008, 5:26 PM
#17
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

Thanks..that mostly worked (after some experimentation)

How can I show featured products on the homepage but not on all other pages?

or how do I just show a few of my popular products on the home page without showing the "featured products" bar (heading)?

27 Jul 2008, 7:20 PM
#18
vision2003 avatar

vision2003

New Zenner

Join Date:
Jul 2008
Posts:
33
Plugin Contributions:
0

Re: Using my own template

How do I add products to featured products?

I went to: Catalog-products-new product but only see a list of preloaded samples

I created a new category and added a product to it in products/cats

Please advise
Thanks

28 Jul 2008, 3:15 AM
#19
afo avatar

afo

Totally Zenned

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

Re: Using my own template

admin->categories/products->featured products

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

28 Jul 2008, 3:41 AM
#20
afo avatar

afo

Totally Zenned

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

Re: Using my own template

afo:

admin->categories/products->featured products

That should be admin->catalog->featured products

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