Forums / Templates, Stylesheets, Page Layout / Deleting Top Search Bar completely!

Deleting Top Search Bar completely!

Locked

Views: 1,176

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
27 Jan 2010, 3:55 PM
#1
christophert avatar

christophert

New Zenner

Join Date:
Nov 2008
Posts:
32
Plugin Contributions:
0

Deleting Top Search Bar completely!

Dear all,

I really want to delete the top search bar (the one next to Currencies) but cant do it.

I am aware you can turn off other search options from the admin>tools>layout box controller but it doesnt relate to this one :frusty:

How do i hide it/get rid of it, as the search function doesnt work and i am positive that it is a proving an annoyance to my customers!

You can see my website here to see what i mean....

Please help! :cool:

27 Jan 2010, 4:16 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Deleting Top Search Bar completely!

You can add display:none; to .cell2 in stylesheet_tm.css.

28 Jan 2010, 6:12 PM
#3
christophert avatar

christophert

New Zenner

Join Date:
Nov 2008
Posts:
32
Plugin Contributions:
0

Re: Deleting Top Search Bar completely!

Thank you...however i'm really not that polished when it comes to html stuff....

where can i find this to impletment the hide?

Thanks for your assistance :oops:

29 Jan 2010, 6:28 AM
#4
eentje avatar

eentje

Zen Follower

Join Date:
Jan 2009
Location:
The Netherlands/Germany
Posts:
144
Plugin Contributions:
4

Re: Deleting Top Search Bar completely!

open up your inludes/templates/YOURTEMPLATE/css/stylesheet_tm.css with NotePad++ or something similar.

find at about line 54

#cell2 {
color:#2A383D;
font-size:11px;
font-weight:bold;
line-height:14px;
}

and make it look like:

#cell2 {
color:#2A383D;
font-size:11px;
font-weight:bold;
line-height:14px;
display:none;
}

save the file and upload it to your server.

I came, I saw, I got zenned... :)

31 Jan 2010, 4:23 AM
#5
orcasoul avatar

orcasoul

Zen Follower

Join Date:
Jan 2010
Posts:
133
Plugin Contributions:
0

Re: Deleting Top Search Bar completely!

eentje:

open up your inludes/templates/YOURTEMPLATE/css/stylesheet_tm.css with NotePad++ or something similar.

I'm trying to do the same thing - but can't find a stylesheet_tm.css file anywhere in the ZenCart folder.

Is the search bar itself named "cell2"? Because I don't see that either.

31 Jan 2010, 5:25 AM
#6
orcasoul avatar

orcasoul

Zen Follower

Join Date:
Jan 2010
Posts:
133
Plugin Contributions:
0

Re: Deleting Top Search Bar completely!

OK, with some searching and experimentation I think I found the solution (keep in mind I just started figuring out Zen Cart - but do know HTML

Assuming you have a copy of /includes/templates/template_default/common/tpl_header.php in your template
(Mine is in /includes/templates/orcatools/common/tpl_header.php)

Search for 'bof-navigation display', you should see the following:

<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>

<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->

All I needed to do to remove this was to comment out the navMainWrapper div (note the lines in red):

<!--bof-navigation display-->
[B]<!-- do not show the top search bar[/B]
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>

<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>


<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>[B]-->[/B]
<!--eof-navigation display-->

Reload the page, the search bar should be gone.

31 Jan 2010, 4:12 PM
#7
stevesh avatar

stevesh

Black Belt

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

Re: Deleting Top Search Bar completely!

OrcaSoul: the original reply was specific to the OP's Template Monster template.

With a standard Zencart template, the easy way is to add display:none; to #navMainWrapper in the stylesheet. Your way works too, but I prefer not to change code if I don't have to.

Also, if the goal is to turn off just the header search bar, rather than the main navigation, Admin - Tools - Layout Boxes Controller

31 Jan 2010, 7:48 PM
#8
orcasoul avatar

orcasoul

Zen Follower

Join Date:
Jan 2010
Posts:
133
Plugin Contributions:
0

Re: Deleting Top Search Bar completely!

stevesh:

OrcaSoul: the original reply was specific to the OP's Template Monster template.

With a standard Zencart template, the easy way is to add display:none; to #navMainWrapper in the stylesheet. Your way works too, but I prefer not to change code if I don't have to.

Also, if the goal is to turn off just the header search bar, rather than the main navigation, Admin - Tools - Layout Boxes Controller

:oops:

OK, sorry about that - I'm new here, and yesterday was a long day.

3 Feb 2010, 9:21 AM
#9
christophert avatar

christophert

New Zenner

Join Date:
Nov 2008
Posts:
32
Plugin Contributions:
0

Re: Deleting Top Search Bar completely!

Thank you!!! :clap:

Does this same logic apply if i wish to get rid of the currencies thing and the whole of the gray bar on the top of my website??

Thanks for your help guys!

3 Feb 2010, 10:30 AM
#10
stevesh avatar

stevesh

Black Belt

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

Re: Deleting Top Search Bar completely!

The whole gray bar is .nav. The display:none; thing will remove that, too.