Forums / Templates, Stylesheets, Page Layout / Need help customizing template

Need help customizing template

Started by swingin_sparrow on 31 May 2012, 5:24 PM · Views: 2,275

Results 1 to 20 of 27
31 May 2012, 5:24 PM
#1
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Need help customizing template

Hi fellow zeners.
I m kinda new at this, so sorry for my lack of knowledge.
I'm trying to build a webstore for my shop. I decided to use the Avignon template cos I like the wood theme on it.
Now here's one problem I have, I replaced the header wood picture by my own, and it contains my logo and the name of my shop already, so, my question is, is there a way to not have the store name, your tag line here and store address display on top of that picture? I've already searched the tutorials and wiki, and on the forum the only thing I found about that was a suggestion to just blank the name of the shop and its address in the Configuration/ my store section of the admin page of Zen Cart. Now when that would probably fix the problem temporarily, I don't want to have blanks for these info when they'd be needed on other pages or documents, like invoices etc. Is there something somewhere that can be edited to tell the template to not display these in the header?
Any help would be much appreciated, like I said I'm new to this and I make really small steps in my progress.
Thanks

31 May 2012, 5:48 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Need help customizing template

Any time you ask questions about template options or layout, it's pretty much necessary that you provide a link to the site.

31 May 2012, 5:55 PM
#3
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Hi,
thanks for your reply,
My site is not online yet, as I'm still trying to set everything up, but my question concerns the Avignon template, which is the base I'm using to make my custom template. I thought my question was clear enough and didn't require someone to see the actual site, I'm quite confused now, sorry for that.
What can I do to get help then? Let me know
Thanks

31 May 2012, 6:27 PM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Need help customizing template

Problem is, in order to see what you're seeing, we would have to download and install that template, as most of us don't use it.

This is the main reason why I don't recommend installing Zencart locally. Some here disagree.

Looking at that template at (sorry, site offline), it looks like the author has coded the store name and address into the header, and the script text is in the class 'headerTitle'.

If you want to remove those things, the easiest way would be to edit tpl_header.php and remove everything between <!--bof-branding display--> and <!--bof-header ezpage links-->

31 May 2012, 8:15 PM
#5
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Hi Stevesh,
Yeah I apologize for the trouble, I understand it's quite tricky for people who can't see the template. I can try to delete these things, then see how it works. I have located the part of the code to edit. I will post back if this works the way I want.
What do you mean by "don't recommend installing Zencart locally". I have installed my zencart on a server hosted, and I'm doing it all by myself cos I can't afford to pay someone to do it, so of course sometimes I'm bound to get stuck, so I rely on people to help me, so I thank you for your time and help, I hope I'm not being annoying too much with my lack of knowledge. :)
Thanks a lot

31 May 2012, 8:48 PM
#6
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Ok,
I removed the part of the code as suggested. uploaded the whole template, but when I launch the online catalog, I only have the background, nothing else is showing. Damn, it seems everytime I try to fix something I go backwards, no progress at all :(
I'm gonna see if I can put the site online so that I can show what it is I'm doing...

31 May 2012, 9:03 PM
#7
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Ok,
I think you can see my webstore right here. I wasn't sure it was online but I guess it is, right?
http://shop.fastnloud.com/zencart/

31 May 2012, 9:21 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Need help customizing template

Your HTML source has

<!--bof-branding display-->
<div id="logoWrapper">
<address style="float:right; text-align:right; margin: 105px 40px 1px 1px; font-weight:bold;">Fast'n'Loud<br />
Swingin' and Rockin' Shop Deluxe<br />
Kalevankatu 40<br />
00180 Helsinki<br />
Finland<br />
+358440350668<br />
[email protected]</address>
<div class="headerTitle"><h1 class="shadow">Fast'n'Loud</h1><h1>Fast'n'Loud</h1></div>
    
    <div id="taglineWrapper">
      <div id="tagline">TagLine Here</div>


</div>
<br class="clearBoth" />
<!--bof-header ezpage links-->
``` You need to remove everything in your tpl_header.php file between <!--bof-branding display--> and <!--bof-header ezpage links--> (this will include a bunch of PHP code that doesn't show here), leaving this section of the file looking like
<!--bof-branding display--> <!--bof-header ezpage links-->
31 May 2012, 9:31 PM
#9
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Hi gjh42,
Thanks for helping.
Well that's what I did earlier but then once uploaded all I had was the background, that's why I reverted to the previous untouched settings and everything came back...
I don't understand, this is driving me crazy :)

1 Jun 2012, 3:08 AM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: Need help customizing template

all I had was the background Which background? The header bg image, the page background, ???
Do you mean that nothing except this background is showing at all? If you do it again and look at "view source", what does the HTML source look like compared to a normal page display? If shorter than normal, what is the last thing in the HTML source?

1 Jun 2012, 3:50 AM
#11
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Need help customizing template

Looks like you changed the name of the template. Is it good practice to have a space in your template name?

includes/templates/Webstore Template/css/stylesheet.css

I test alot of templates and have never downloaded a two-name template with spaces. Example, gjh42 uses an underscore:

includes/templates/fr_template/css/stylesheet.css

Possibly something to look at before you get too far. I dunno.

Steve
prommart.com

1 Jun 2012, 4:36 AM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Need help customizing template

SPH:

Looks like you changed the name of the template. Is it good practice to have a space in your template name?

I'm not sure who this response is for, but the answer is NO!. Template names should never contain a space character. In some cases it won't cause a problem, but there are many instances where the spaces will cause an issue (usually with symptoms that make it near impossible to diagnose the cause).

The standard/recommended practice it to replace spaces with underscores.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

1 Jun 2012, 4:41 AM
#13
gjh42 avatar

gjh42

Black Belt

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

Re: Need help customizing template

It seems to usually work to have spaces in your template folder name, since people get away with it, but sometimes the space will cause an error, perhaps from third-party code that is not as bulletproof as core ZC. However, it is never a good practice. Windows has spoiled people by allowing them to name directories anything at all and hiding the fact that the names have to be tweaked behind the scenes to function safely... perhaps an overreaction from the old DOS practice of limiting folder names to eight characters total.

The best web practice is to keep file and folder names to lowercase letters, numbers and - or _ characters. This will minimize the possibility of capitalization typos.

1 Jun 2012, 8:45 AM
#14
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Hi,
Well I just have the background of the page, blue with small stars (bg.gif), all the boxes, pictures and text are gone.
As for the source, it shows this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title>Zen Cart!, The Art of E-commerce</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="Men Ladies Accessories Jewellery Pomade Home Books Magazines ecommerce, open source, shop, online shopping " />
<meta name="description" content="Zen Cart! :  - Men Ladies Accessories Jewellery Pomade Home Books Magazines ecommerce, open source, shop, online shopping" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="The Zen Cart™ Team and others" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />
 
<base href="http://shop.fastnloud.com/zencart/" />
<link rel="canonical" href="http://shop.fastnloud.com/zencart/" />
 
<link rel="stylesheet" type="text/css" href="includes/templates/Webstore Template/css/stylesheet.css" />
<link rel="stylesheet" type="text/css" media="print" href="includes/templates/Webstore Template/css/print_stylesheet.css" />
</head>
 
<body id="indexHomeBody">
 
<div id="mainWrapper">

I'm not sure I used the right wrap for the source code here.
Gonna put the setting back and check what the source is when everything is showing up...

1 Jun 2012, 8:58 AM
#15
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Ok, code is back the way it was and so is everything on my page, now the source code is showing all the code that was missing previously under that line ```

<div id="mainWrapper"> ```. It is weird that if I remove a small part of the code, the whole thing is disappearing completely... Do I need to put the complete source code here too so you can compare?
1 Jun 2012, 9:19 AM
#16
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

Ok guys, I ve renamed the template and used an underscore... I didn't know about the no space thing. Sorry.

1 Jun 2012, 2:35 PM
#17
gjh42 avatar

gjh42

Black Belt

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

Re: Need help customizing template

If you accurately removed a complete block of PHP/HTML code, you would not have a problem. You have somehow corrupted the file you were working on and caused a PHP fatal error. You should have a myDebug file in the /cache/ folder in your site root. Post the latest one of those and it may tell us exactly where the error is.

If that does not help, you could post your tpl_header.php in PHP tags.

1 Jun 2012, 2:46 PM
#19
swingin_sparrow avatar

swingin_sparrow

New Zenner

Join Date:
Aug 2011
Location:
Helsinki, Finland
Posts:
60
Plugin Contributions:
0

Re: Need help customizing template

gjh42:

If you accurately removed a complete block of PHP/HTML code, you would not have a problem. You have somehow corrupted the file you were working on and caused a PHP fatal error. You should have a myDebug file in the /cache/ folder in your site root. Post the latest one of those and it may tell us exactly where the error is.

If that does not help, you could post your tpl_header.php in PHP tags.

ok I checked the myDebug files, and I found one that says [01-Jun-2012 01:38:08] PHP Parse error: syntax error, unexpected '}' in D:\Hosting\8066884\html\zencart\includes\templates\Webstore Template\common\tpl_header.php on

Does it mean I didn't delete the code properly when I did it?

1 Jun 2012, 3:07 PM
#20
gjh42 avatar

gjh42

Black Belt

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

Re: Need help customizing template

Technically, yes, though since this is a custom version of the file, there is apparently some extra PHP code that crosses boundaries of code blocks. Following the standard advice exactly would cause this error. We will need to see your copy of the file to find out where it is. The debug message will say exactly what line of the file has this error. Posting that verbatim is better than summarizing it if you don't know exactly what bits are relevant.