Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

search button not working good.


Azim

Recommended Posts

Hello,

i am having this weird kind of problem with my site.

On the site there's a search box right and a button next to it to click to search.

So for me when i enter something in the field and press enter on my keyboard (as usually it works) it should go to the search results. but it dosent.

And when i click on the button to search it takes me to the advanced search page.

 

P.S: i am using a template and i also did some design changes in the header. so maybe i messed something. but not sure.

ANy clue please.

Thanks

here is the code appears for search section.

<table cellpadding="0" cellspacing="0" border="0" style="auto">
									<tr>
										<td>
			<?=BOX_HEADING_SEARCH?>
											<?php
											$v1=tep_draw_input_field('keywords', '', 'size="10" maxlength="30" class="input"') . '' . tep_hide_session_id();

											echo ($v1);
											?>
											<?php //echo tep_draw_separator('spacer.gif', '3', '1'); ?>												



<a href="<?=tep_href_link(FILENAME_ADVANCED_SEARCH)?>"><?php echo tep_image(DIR_WS_IMAGES.'k1.gif')?></a>

											<?php echo tep_draw_separator('spacer.gif', '30', '1'); ?><a href="<?=tep_href_link(FILENAME_ADVANCED_SEARCH)?>"><?=BOX_SEARCH_ADVANCED_SEARCH?></a>
</td>
</tr>

Link to comment
Share on other sites

As with some templates that looks kinda screwy. That should be in a <form></form>. Something like this

<?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_draw_hidden_field('search_in_description' , '1') . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a></form>';?>

You may have to change the name of the images to yours.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...