Zen Cart Logo
Forums / Addon Templates / Alternative Header 1.1a module problem

Alternative Header 1.1a module problem

Locked

Views: 3,517

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
10 Jan 2008, 6:37 PM
#1
dml311071 avatar

dml311071

New Zenner

Join Date:
Sep 2006
Location:
Grimsby UK
Posts:
98
Plugin Contributions:
0

Alternative Header 1.1a module problem

Hi

I am using this mod for a customer and ther appears to be a couple of problems.

  1. There is a rogue '// ?>' in the header.

From what I can gather of the PHP the error lies here

<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<?
//<!--bof-drop down menu display-->
//  <?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?>
//  <!--eof-drop down menu display-->
?>
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">

This is in the tpl_header.php of the module between lines 91 and 103. It shows in the output source code too. I have not modified the header file so, this error must have been present from the original source code. This would suggest to me that others have encountered this issue too.

  1. In FF, the body of the site is shifted a whole screen over the to the right! Oddly, Opera seems to display the site perfectly well (I normally find this browser to be very fussy of code) and Both IE 6 and 7 attempt to render the site properly but with a a bottom scroll bar.

I am running the cat_tabs_1.1a module too and I'm beginning to wonder if the two stylesheets clash in some way. I can read CSS pretty well but this one is evading me!

Has anyone else had this problem?

Thanks

Dave

10 Jan 2008, 7:44 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Alternative Header 1.1a module problem

Can't see any evidence of a rogue //?> in that code, and you don't explain why you think there is one, or why you think it might be in that block of code.

The body of a site being shifted over to the right, usually means that there is a clear:both style needed on whatever is containing that content.

10 Jan 2008, 8:34 PM
#3
dml311071 avatar

dml311071

New Zenner

Join Date:
Sep 2006
Location:
Grimsby UK
Posts:
98
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

Hi

Thanks for the response. I have included screen shots of the page:

  1. the browser view pane snippet (I have removed the background images for clarity).

  2. The browser source view imported into N++

I agree with the comment on the 'clear' values within the div tag, but it seems odd to me that adding a known mod has this effect. I have tried this mod on my localhost and on a live server. I have also tried downloading the mod again in case my FTP client introduced an error.

I was curious if anyone else had hit this problem because I have not changed the PHP code, although, I have , of course altered the CSS but the problem occurs using the mod's own css too.

Odd!:huh:

Dave

16 Jan 2008, 6:42 PM
#4
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: Alternative Header 1.1a module problem

I also am having this problem. Running Zen Cart v1.38a.

16 Jan 2008, 6:55 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Alternative Header 1.1a module problem

To be clear, you are using the alternative header version 1.1a and not Clyde's 2.0.

There is indeed a bug in it, as well as a PHP short tag (not recommended).

I recommend going to the tpl_header.php file and replacing this code

<?
//<!--bof-drop down menu display-->
//  <?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?>
//  <!--eof-drop down menu display-->
?>

with this

<!--bof-drop down menu display-->
  <?php // require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?>
<!--eof-drop down menu display-->
16 Jan 2008, 7:02 PM
#6
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: Alternative Header 1.1a module problem

Thank you, that did it. You wouldn't happen to know what was modified in the CSS? That was not mentioned in the documentation.

Cal

17 Jan 2008, 12:27 PM
#7
dml311071 avatar

dml311071

New Zenner

Join Date:
Sep 2006
Location:
Grimsby UK
Posts:
98
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

To Kuroi:

Thanks for the php correction. Clearly this needs adding to the downloads section. It would be presumptious of me but you clearly qualify sufficiently.

I am impressed with your designs too; I have used ideas from your future zen mod on a few occasions. These have yet to pay their invoices though!

On a side note kuroi, how did you approach learning PHP? I feel sufficiently qualified in XHTML and CSS to make the leap and I have bought a book from a reputable source. I know that I probably shouldn't mention its title or publisher, but it's well known and the publisher has an orange and blue logo! I aim to be able to add mods to this cart too.

PS I was unaware that there was a 'Clyde 2.0' header. Is this a more 'correct' mod to use?

To modernm:

Sorry, I have not noted the changes in the css. Time constraints prevent me from listing any possible differences. I would refer you to the excellent and free solution: WinMerge. This program has an excellent visual interface that provides side by side (almost, watch the line numbers!) comparison of text files.

Also, It is worth pointing out that I have not used the alternative header mod in ZC 1.3.8
As I understand it, this new release does have many differences compared to the ZC1.3.7 that I use.
I would recommend using 1.3.7 until all of the teething issues of 1.3.8 have been ironed out. Older mods will cause problems with the 1.3.8 release. No-one is to blame, it is a side effect of the cart's evolution <-- I add this to prevent any misunderstandings!

Regards to you both

Dave

22 Jan 2008, 7:02 PM
#8
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Alternative Header 1.1a module problem

I wanted to have this module in addition to how I have my Header now.

Does anyone know how I can manually add this mod???

22 Jan 2008, 7:49 PM
#9
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Alternative Header 1.1a module problem

dml311071:

On a side note kuroi, how did you approach learning PHP? I feel sufficiently qualified in XHTML and CSS to make the leap and I have bought a book from a reputable source. I know that I probably shouldn't mention its title or publisher, but it's well known and the publisher has an orange and blue logo! I aim to be able to add mods to this cart too.I started programming in BASIC 30 years ago and worked in IT before moving into more corporate roles. As a result I already had a large number of languages under my belt before bowing out of corporate life to found a web design agency. Adding PHP was therefore straightforward for me, but also means that I was most-likely starting from a very different place to you.

dml311071:

I was unaware that there was a 'Clyde 2.0' header. Is this a more 'correct' mod to use?I think that, apart from the error discussed above, they are different rather more or less correct. But that's not a very informed view as I don't use either of them.

26 Apr 2008, 7:10 AM
#10
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

Hi Kuroi,

This is a great mod.
The 1 issue I'm having is somehow my search box is now showing twice. Is there a code that's being duplicated and needs to be removed from the file? Thanks.

26 Apr 2008, 12:26 PM
#11
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Alternative Header 1.1a module problem

Robbyn7:

Hi Kuroi,

This is a great mod.Appreciation better directed towards the mod's author than me. I don't even use it! Unless you're suggesting that I should ..... :D

Robbyn7:

The 1 issue I'm having is somehow my search box is now showing twice. Is there a code that's being duplicated and needs to be removed from the file? Thanks.There's no duplicate code, and the problem would be difficult to diagnise without seeing your site, but have you looked at this FAQ Entry which may be relevant?

28 Apr 2008, 4:53 PM
#12
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

There's no duplicate code, and the problem would be difficult to diagnise without seeing your site, but have you looked at this FAQ Entry which may be relevant?[/quote]

Thanks Kuroi for the reply,

I definitely played around with the sidebox controls before posting this. It's not a big issue. I just thought only home and login would move underneath the header. I'll take a look at the format of my stylesheet and see if a change needs to made there.

FD Fashions

28 Apr 2008, 5:02 PM
#13
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Alternative Header 1.1a module problem

Robbyn7:

Thanks Kuroi for the reply,

I definitely played around with the sidebox controls before posting this. It's not a big issue. I just thought only home and login would move underneath the header. I'll take a look at the format of my stylesheet and see if a change needs to made there.

FD Fashions
I take it back. Now that I can see your site, I see that it is based on the Purpleshades template. which was converted from Zen Cart 1.2. As a result, it's structure is a little different to templates explicitly designed for Zen Cart 1.3 and it does look as though using the alternative header mod has introduced a whole host of duplicated code (not just the search box).

You need to see where the two block for the navMainWrapper are built and decide which you want to keep.

29 Apr 2008, 2:41 PM
#14
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

Thanks Kuroi,

I will take a look at my stylesheet and go from there.

15 May 2008, 11:21 PM
#15
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

Kuroi,

I looked at my stylesheet but can't find where there's any duplications. Any other place I can look? Thanks.

Robyn - FDF

16 May 2008, 7:13 AM
#16
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Alternative Header 1.1a module problem

The duplication isn't in your stylesheet. You have two navigation blocks, probably in your includes/templates/purpleshades/common/tpl_header.php file.

17 May 2008, 9:29 PM
#17
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

Thanks so much Kuroi for your help!

That was the solution to my problem!!:clap:

11 Apr 2010, 4:03 PM
#18
konservasi avatar

konservasi

New Zenner

Join Date:
Mar 2010
Posts:
34
Plugin Contributions:
0

Re: Alternative Header 1.1a module problem

kuroi:

To be clear, you are using the alternative header version 1.1a and not Clyde's 2.0.

There is indeed a bug in it, as well as a PHP short tag (not recommended).

I recommend going to the tpl_header.php file and replacing this code

<? //<!--bof-drop down menu display--> // <?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?>

// <!--eof-drop down menu display-->
?>

> 
> with this
> ```php
<!--bof-drop down menu display-->
  <?php // require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?>
<!--eof-drop down menu display-->

hai, when I fix it..my site have been gone

need assistant

this is my site

konkomsite.com/galeri gis