Jump to content
Sign in to follow this  
Redsonya

Advanced Search in Header

Recommended Posts

Hi Everyone,

 

I just installed the Advanced Search in Header yesterday and I got it working great! There were a couple things like some unclosed tags that needed fixing.. But the fix was posted in the contribution as well.. So no big deal there..

 

Now the problem at hand is this.. Like I was saying.. The contribution is working great.. UNTIL you log into your account on board the shop.. Once logged in.. This search field in header totally disappears.. And is NO longer available at that point.. I don't know if it was designed to be like this.. Or there is some glitch here.. I'm thinking glitch.. Because customers need a search field available to look for things whether logged in or not! lol Ya know what I mean here guys? :P

I realize that there are exempt pages like the advanced search page itself in which the search field is no longer showing for good reason.. Over kill.. Fair enough.. But not showing up at all when logged in? Hmmmmm I definately need a fix here..

Below is the main code placed in header, please someone help me..

 

<?php 
//
// START  advanced search header  script insertion
//
//
?>
<?php

if ( (!strstr($_SERVER['PHP_SELF'],'checkout.php')) and (!strstr($_SERVER['PHP_SELF'],'create_account.php')) and (!strstr($_SERVER['PHP_SELF'],'shopping_cart.php')) and (!strstr($_SERVER['PHP_SELF'],'advanced_search.php')) and !tep_session_is_registered('customer_id') )  {
?>
<table align="center" border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr>
<td align="center" class="headerNavigation">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="infoBoxContents" valign="middle" colspan="0">
 <?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get"') ?>
<table border="0" width="50%" cellspacing="0" cellpadding="1" align="center">
<tr>
<td class="infoBoxContents" valign="middle" colspan="3"> </td>
<td class="infoBoxContents" valign="middle" colspan="3"><?php echo tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+30) . 'px"')  ?></td>
<td class="infoBoxContents" valign="top" colspan="3"> </td>
<td class="infoBoxContents" valign="middle" colspan="3"><?php echo BOX_ADVSEARCH_CAT ?></td>
<td class="infoBoxContents" valign="middle" colspan="3"><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ADVSEARCH_ALLCAT)))) ?></td>
<td class="infoBoxContents" valign="top" colspan="3"> </td>
<td class="infoBoxContents" valign="middle" colspan="3"><center><?php echo tep_image_submit('button_search.gif', 'Search'); ?></center></td>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php } ?>
<?php 
//
// END advanced search header script insertion
//
//
?>

 

 

Thanks in Advance,

 

Christine


If it ain't broke, don't fix it! :)

Share this post


Link to post
Share on other sites

Hey guys.. I think I got it.. I thought this would be the answer to it.. But wasn't sure if certain missing code like a bracket or something would of messed it up but good.. But so far.. So good! It's working..

 

Fix is simply removing this:

 

and !tep_session_is_registered('customer_id')

 

And wella! You log in and your search field is available.. :)

 

Thanks guys, and I hope this helps anyone else who may be having the same problem too..

 

Christine


If it ain't broke, don't fix it! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×