Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Search box problem


varnco

Recommended Posts

I am having a search box problem, ever since I've added a few contributions/mods.

 

The issue is that the product description is ending up inside the search box.

 

You can see whast is happening here (look in the search box):

http://www.varnco.com/catalog/catalog/prod...?products_id=38

 

The search code that I am using is as follows:

 

Quick Find</font>

<form name="quick_find" method="get" action="http://www.varnco.com/catalog/catalog/advanced_search_result.php"> 

<input type="text" name="keywords" size="10" maxlength="30" value="" style="width: 95px"> <input type="submit" value="go"><br>

 

I can't figure out why it's calling the product description into the text entry box for search since value is set to "". Any ideas?

 

Any help is appreciated.

Link to comment
Share on other sites

I added the following code to productinfo.php, so it would display the product name in the title and add keywords into the header:

 

// BOF added by varnco for product in title and meta tags

if (isset($products_id)) { 

$product_info = tep_db_query("select p.products_id, pd.products_name, pd.products_description from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'"); 

$product_info_values = tep_db_fetch_array($product_info); 



$keywords = strip_tags($product_info_values['products_description']); 

$keywords = substr($keywords, 0, 250); 

}

// EOF added by varnco for product in title and meta tags

 

Any reason why the 2 "$keywords" command would cause the product description to show up within the search box in addition to the header?

Link to comment
Share on other sites

Not really 'fixed' but rather, I commented out the two lines that calls for keywords. I commented out these two lines, which are the culprit:

 

$keywords = strip_tags($product_info_values['products_description']);

$keywords = substr($keywords, 0, 250);

 

I'll go ahead an put them back in, so perhaps someone can tell me why the above "$keywords=" is automatically entering the product description into my search box.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...