Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Alter Search box code


Top_Speed

Recommended Posts

Hi all fellow osCers,

 

I would like to add a search box to my (osC embedded) links page (so a user can search for his/her link. I have the basic code below but need to know what needs to be added/replaced for the seacrhing of the links.php or database.

 

 <?php
echo tep_draw_form('quick_find',
tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')
.
tep_draw_input_field('keywords') . ' ' . tep_hide_session_id() .
tep_image_submit('button_quick_find.gif') . 
'<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>Advanced
Search</b></a></form>';
?>

 

Pre Thanks, I hope a phper has an answer!

KJ Miller

define('PROJECTS', 'Something that goes on forever!');

Link to comment
Share on other sites

Hi all fellow osCers,

 

I would like to add a search box to my (osC embedded) links page (so a user can search for his/her link. I have the basic code below but need to know what needs to be added/replaced for the seacrhing of the links.php or database.

 

 <?php
echo tep_draw_form('quick_find',
tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')
.
tep_draw_input_field('keywords') . ' ' . tep_hide_session_id() .
tep_image_submit('button_quick_find.gif') . 
'<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>Advanced
Search</b></a></form>';
?>

 

Pre Thanks, I hope a phper has an answer!

KJ Miller

 

 

Hello

 

you don?t have to get stuck in the php code . you can use PURE .HTML code ?

i am using this ... directly in the header.php and it works very well .

 

<!-- search form in the header -->
<form name="quick_find" method="get" action="advanced_search_result.php">
<input type="text" name="keywords" size="10" maxlength="30" value="" style="width: 115px">
<input type="hidden" name="search_in_description" value="1">
<input type="image" src="images/button_add_quick.gif"  name="Submit" value="Submit"><a href="advanced_search.php">  advanced Search</a>
</form> 
<!-- search form in the header eof-->

 

 

I hope this will help you.

 

(the code you have might make you troubles when you want to arrange it in your page if you are a newbie.

 

Adrian

Link to comment
Share on other sites

Hi Adrain,

Thanks for the reply!

 

Not sure how that will search the links pages (db)? ON the current search box (OE osC) it leaves out the links pages (db) and I think your Html (form method) would also.

 

Any additional thoughts?

KJ

define('PROJECTS', 'Something that goes on forever!');

Link to comment
Share on other sites

Hi Adrain,

Thanks for the reply!

 

Not sure how that will search the links pages (db)? ON the current search box (OE osC) it leaves out the links pages (db) and I think your Html (form method) would also.

 

Any additional thoughts?

KJ

 

 

Hello

 

I am not sure i understand what do you want.. :blush: but.. any info you store is in teh database. in the .html form i gave you i completetd it with a line to search the keywords in teh descriptopn of the product too (not only in the product name field) .

 

do you store the link as a product or do you put the link as a description of some keywords ?

 

Greetz,

Adrian

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...