Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / I don't want to install a template, I just want my own header navigation bar...

I don't want to install a template, I just want my own header navigation bar...

Locked
This thread is locked. New replies are disabled.
20 Aug 2009, 1:42 PM
#1
xtina avatar

xtina

New Zenner

Join Date:
Aug 2009
Posts:
11
Plugin Contributions:
0

Post #1 by xtina

Hi,

first off, I am not a PHP person. At all. :P

I have my own navigation bar on my website. I want to use that instead of a template... but I have no idea which file to modify. I've tried modifying the header.php, tgl_header.php and stylesheets.css and that has done absolutely nothing.

The navbar I want to use is this:

It is done in CSS.

I already have it coded for the rest of the website, I'm just having trouble actually applying it to zencart. Can I even apply it to zencart at all? I'm sure there's a way, right? :wacko:

I have version 1.3.8. I've just recently completely reset zencart so right now it's completely unmodified.

20 Aug 2009, 4:06 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Post #2 by gjh42

You have a template whether you install a new one or not; if you make any customization to your Zen Cart, you should make an override template folder so your changes are not wiped out in an upgrade. You should be able to modify your navbar code to work when inserted into tpl_header.php. The links may need to be reworked a bit, depending on how you currently have them set up. Posting the code will help us advise on how to use it in ZC. The images will likely need to be duplicated in the ZC /includes/templates/your_template/images/ folder, and the styling will need to be replicated in your ZC stylesheet.

21 Aug 2009, 3:21 AM
#3
xtina avatar

xtina

New Zenner

Join Date:
Aug 2009
Posts:
11
Plugin Contributions:
0

Post #3 by xtina

Well, this is the code I'm using in my stylesheet.

/* CSS Document */
body{padding:0px; margin:0px; background:#fff url(../images/b_body.gif) 0 0 repeat-x; color:#848484; font:10px/12px Tahoma, sans-serif;}
div, p, ul, h2, h3, h4, img{padding:0px; margin:0px;}
ul{list-style-type:none;}

.clear {clear: both; margin: 0px; height:0}

p a{font:10px/12px Tahoma, sans-serif; color:#60b13b; text-decoration:underline;}
p a:hover{ color:#000; text-decoration:none;}

p span.headline{font:11px/14px Trebuchet MS, sans-serif; color:#464646; font-weight:bold}
p.subtitle{font:11px/12px Arial, Helvetica, sans-serif; color:#959595; text-transform:uppercase; display:block; border-bottom:#959595 1px dotted; padding-

bottom:10px; padding-left:3px}

#container{width:775px; margin:0 auto; position:relative; background:url(../images/b_header.jpg) 0 0 no-repeat}

/* HEADER */

#header{height:184px; position:relative; margin:0 auto}

#logo{position:absolute; top:14px; left:51px}

#searchForm{position:absolute; top:21px; left:473px}

#searchForm img#h_search{float:left; margin-right:5px; padding-top:1px}
#searchForm input{width:112px; height:14px; background:#4a4a4a; float:left; margin-right:5px; font:10px/12px Tahoma, sans-serif; color:#fff; border:none}
#searchForm img#submit{float:left; padding-top:1px}

#header ul.menu{position:absolute; top:58px; left:63px; width:675px}
#header ul.menu li{float:left; width:83px; height:97px; margin-right:0px}
#header ul.menu li a{ width:83px; height:97px; display:block; text-indent:-20000px; }
#header ul.menu li a:hover{ width:83px; height:97px;}

#header ul.menu li.shop a{background:url(../images/btn_1.jpg) 0 0 no-repeat; }
#header ul.menu li.shop a:hover{background:url(../images/btn_1_over.jpg) 0 0 no-repeat;}

#header ul.menu li.arcade a{background:url(../images/btn_2.jpg) 0 0 no-repeat; }
#header ul.menu li.arcade a:hover{background:url(../images/btn_2_over.jpg) 0 0 no-repeat;}

#header ul.menu li.pccafe a{background:url(../images/btn_3.jpg) 0 0 no-repeat; }
#header ul.menu li.pccafe a:hover{background:url(../images/btn_3_over.jpg) 0 0 no-repeat;}

#header ul.menu li.lounge a{background:url(../images/btn_4.jpg) 0 0 no-repeat; }
#header ul.menu li.lounge a:hover{background:url(../images/btn_4_over.jpg) 0 0 no-repeat;}

#header ul.menu li.manga a{background:url(../images/btn_5.jpg) 0 0 no-repeat; }
#header ul.menu li.manga a:hover{background:url(../images/btn_5_over.jpg) 0 0 no-repeat;}

#header ul.menu li.tournaments a{background:url(../images/btn_6.jpg) 0 0 no-repeat; }
#header ul.menu li.tournaments a:hover{background:url(../images/btn_6_over.jpg) 0 0 no-repeat;}


#header ul.menu li.repair a{background:url(../images/btn_7.jpg) 0 0 no-repeat; }
#header ul.menu li.repair a:hover{background:url(../images/btn_7_over.jpg) 0 0 no-repeat;}


#header ul.menu li.rates a{background:url(../images/btn_8.jpg) 0 0 no-repeat; }
#header ul.menu li.rates a:hover{background:url(../images/btn_8_over.jpg) 0 0 no-repeat;}

Then this is the code I've tried inserting into my tpl_header.php file:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Computer Games</title>

<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="header">

<div id="logo"><a href="#"><img src="images/logo.jpg" alt="ComputerGames" width="247" height="34" border="0" /></a></div>

<div id="searchForm">

<form action="" method="post" enctype="multipart/form-data" name="searchForm">

  <img src="images/h_search.jpg" width="94" height="17" alt="" id="h_search" />
  
  <input name="searchField" type="text" />
  <a href="#"><img src="images/btn_search.jpg" alt="submit" width="13" height="13" border="0" id="submit"/></a>
  
  
</form>

</div>

<ul class="menu">
<li class="shop"><a href="#" title="Shop online">shop</a></li>
<li class="arcade"><a href="#" title="Our arcade">arcade</a></li>
<li class="pccafe"><a href="#" title="PC Cafe">pc cafe</a></li>
<li class="lounge"><a href="#" title="gaming lounge">game lounge</a></li>
<li class="manga"><a href="#" title="manga library">manga</a></li>
<li class="tournaments"><a href="#" title="tournaments">tournaments</a></li>
<li class="repair"><a href="#" title="repairs">repairs</a></li>
<li class="rates"><a href="#" title="rates">rates</a></li>
</ul>

</div>

I get the black bar I wanted, but no links and the whole shop completely disappears...

http://www.thundershockgames.com/store/

21 Aug 2009, 8:22 AM
#4
niccol avatar

niccol

Totally Zenned

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

Post #4 by niccol

The tpl_header.php file contains the code that creates the visible header but not the code that creates the <head> to </head> of the html document. This comes from another file html_header.php.

So, apart from anything else what you have done is create a document with two <head> tags which is always going to mess up browsers.

There is no reason why you can't add non-zen code into the files but you need to know which files to edit and if you remove any code from these files it is likely to have some big effects. Most of the guts of Zen is coded in php rather than straight html.

Nick
iszent.com