Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / creating new templates for CSS/PHP virgin

creating new templates for CSS/PHP virgin

Locked

Views: 4,086

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
6 Jun 2006, 12:24 PM
#1
sutekh avatar

sutekh

New Zenner

Join Date:
Jun 2006
Posts:
8
Plugin Contributions:
0

creating new templates for CSS/PHP virgin

I am a complete noob. I am helping my friend with his website which until now has been entirely very basic html editing. Neither of us has ever done anything with PHP or CSS except that which is automatically generated for us by programs such as dreamweaver. I've been trying to pick it up as I'm going along.

I was trying to follow the instructions in the zen-cart.com wiki for creating a new store template... all seemed to be going well, i created a new as yet unmodified template - first thing I noticed is that all the colours changed and the logo.gif and header_bg.jpg vanished.
I worked out where I could edit all the colours in the includes/templates/MY_TEMPLATE/css/stylesheet.css and got my custom logo.gif to appear in the header... but for the life of me, I cannot work out how, where or what to modify in order to get the background image header_bg.jpg to show up in my template. I have a background I made which I would like to display behind the logo in the same way that the classic template Zen-Cart logo does.

Do I need to add something like...

TABLE.header {
background-image: url(../images/header_bg.jpg);
background-repeat: repeat-x;
background-color: #ffffff;
border-right: 1px solid #9a9a9a;
border-left: 1px solid #9a9a9a;
border-bottom: 1px solid #9a9a9a;

...into my stylesheet.css file in my template's css directory? I tried pasting this into my template's stylesheet.css file but it made no difference - maybe I didn't put it into the correct place in the file??? The url path in the example above is correct for my custom header_bg.jpg - I have uploaded my image to /MY_TEMPLATE/images/ directory

Where have I gone wrong?
Please don't kill me.

6 Jun 2006, 2:35 PM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: creating new templates for CSS/PHP virgin

You're on the right track, but add that style for the #logoWrapper id, rather than TABLE.header, so you have:```
#logoWrapper {
background-image: url(../images/header_bg.jpg);
background-repeat: repeat-x;
background-color: #ffffff;
border-right: 1px solid #9a9a9a;
border-left: 1px solid #9a9a9a;
border-bottom: 1px solid #9a9a9a
}

7 Jun 2006, 2:24 AM
#3
sutekh avatar

sutekh

New Zenner

Join Date:
Jun 2006
Posts:
8
Plugin Contributions:
0

Re: creating new templates for CSS/PHP virgin

bunyip:

You're on the right track, but add that style for the #logoWrapper id, rather than TABLE.header, so you have:```
#logoWrapper {
background-image: url(../images/header_bg.jpg);
background-repeat: repeat-x;
background-color: #ffffff;
border-right: 1px solid #9a9a9a;
border-left: 1px solid #9a9a9a;
border-bottom: 1px solid #9a9a9a
}


hmm... ok, I must still be doing something wrong cos it's still not showing.

After further investigation I think I may be onto something - If I right-click the logo.gif image in firefox and get properties, it tells me the image is being loaded from /zencart/includes/templates/template_default/images/logo.gif instead of /zencart/includes/templates/MY_TEMPLATE/images/logo.gif like I thought it was.

What is this telling me?
7 Jun 2006, 2:33 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: creating new templates for CSS/PHP virgin

Are you sure you've activated your template in Admin? If you view the stylesheet for the page being displayed, is it your template or template_default?

7 Jun 2006, 2:35 AM
#5
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: creating new templates for CSS/PHP virgin

do you have a URL for the store?

From Admin > Tools > Template Selection, what does it show as the template directory for the current template?

7 Jun 2006, 2:58 AM
#7
sutekh avatar

sutekh

New Zenner

Join Date:
Jun 2006
Posts:
8
Plugin Contributions:
0

Re: creating new templates for CSS/PHP virgin

bunyip:

do you have a URL for the store?

http://johngordon.com.au/zencart

7 Jun 2006, 3:23 AM
#8
sutekh avatar

sutekh

New Zenner

Join Date:
Jun 2006
Posts:
8
Plugin Contributions:
0

Re: creating new templates for CSS/PHP virgin

it's entireley possible I may have cocked up somewhere during creation of the new template, fooling about with files I shouldn't be. It may be easier if I uninstall everything from the server and start again from scratch... or do you think there is a chance I can still resurrect something from this mess I've made?

7 Jun 2006, 4:47 AM
#9
drbyte avatar

drbyte

Sensei

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

Re: creating new templates for CSS/PHP virgin

It seems you haven't created a folder for
includes/templates/shop_template/images ... and stuck your image files in there

7 Jun 2006, 5:22 AM
#10
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: creating new templates for CSS/PHP virgin

Have to agree with the Doc there - there is no file /includes/templates/shop_template/images/logo.gif

7 Jun 2006, 7:34 AM
#11
sutekh avatar

sutekh

New Zenner

Join Date:
Jun 2006
Posts:
8
Plugin Contributions:
0

Re: creating new templates for CSS/PHP virgin

bunyip:

Have to agree with the Doc there - there is no file /includes/templates/shop_template/images/logo.gif

Ok, now I'm lost for ideas.
The folder is definitely there on the server, and the images are in there too, and they all have the same read/write attributes as the template_default directory... I can even verify this when I connect with FTP client (FireFTP Firefox browser plug-in) and view the files and folders.

So I can't work out why http://johngordon.com.au/zencart/includes/templates/template_default/images/logo.gif will display an image but http://johngordon.com.au/zencart/includes/templates/shop_template/images/logo.gif will not - gives me the 404 not found :(

Is the FireFTP plug-in known for being unreliable? I can load up and old copy of CuteFTP and use that instead if FireFTP is causing me grief.

7 Jun 2006, 8:00 AM
#12
drbyte avatar

drbyte

Sensei

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

Re: creating new templates for CSS/PHP virgin

I would depend more on FileZilla or FlashFXP as a dedicated FTP program.

7 Jun 2006, 9:24 AM
#13
sutekh avatar

sutekh

New Zenner

Join Date:
Jun 2006
Posts:
8
Plugin Contributions:
0

Re: creating new templates for CSS/PHP virgin

just uploaded logo.gif again and now the link in my post above works. The rest of the images in that folder load too.

So now maybe I can get back to the original problem of how do I get the header_bg.jpg to show in background of the logo.gif :/

7 Jun 2006, 5:46 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: creating new templates for CSS/PHP virgin

One problem ... you have used invalid comment symbols here:```
/#tagline {
color:#000000;
font-size: 2em;
text-align : center;
vertical-align: middle;
}/

7 Jun 2006, 5:56 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: creating new templates for CSS/PHP virgin

As for #logoWrapper .... it doesn't seem to like honoring background properties.... :sleepy:

8 Jun 2006, 3:10 AM
#16
sutekh avatar

sutekh

New Zenner

Join Date:
Jun 2006
Posts:
8
Plugin Contributions:
0

Re: creating new templates for CSS/PHP virgin

Woohoo! I sorted it.
I changed #logoWrapper to #headerWrapper and the image magically appeared