Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

search problem


fry

Recommended Posts

Can anyone tell me how to get the quick search facility to search everything??

 

 

 

On this site

 

http://www.townhousegallery.co.uk/shop/

 

if you put 'govinder' in the search box (advanced or basic) it comes up with nothing and as you can see there are 7 products with govinder in.

 

The Artist box incidentally was the manufacturers box just renamed so I guess for some reason it isnt searching on the manufacturers although I need it to search on everything

 

Any help would be appreciated as the only thing I've found in the contributions section is how to replace the quick search with the advanced search and that still doesnt work

 

Thanks

 

:huh:

Link to comment
Share on other sites

Can anyone tell me how to get the quick search facility to search everything??

On this site

 

http://www.townhousegallery.co.uk/shop/

 

if you put 'govinder' in the search box (advanced or basic) it comes up with nothing and as you can see there are 7 products with govinder in.

 

The Artist box incidentally was the manufacturers box just renamed so I guess for some reason it isnt searching on the manufacturers although I need it to search on everything

 

Any help would be appreciated as the only thing I've found in the contributions section is how to replace the quick search with the advanced search and that still doesnt work

 

Thanks

 

:huh:

try including govinder in your product discription

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

Can anyone tell me how to get the quick search facility to search everything??

On this site

 

http://www.townhousegallery.co.uk/shop/

 

if you put 'govinder' in the search box (advanced or basic) it comes up with nothing and as you can see there are 7 products with govinder in.

 

The Artist box incidentally was the manufacturers box just renamed so I guess for some reason it isnt searching on the manufacturers although I need it to search on everything

 

Any help would be appreciated as the only thing I've found in the contributions section is how to replace the quick search with the advanced search and that still doesnt work

 

Thanks

 

:huh:

Try including govinder in your products discription

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

Thanks for the replies and comments, does this mean there isn't a way round it apart from that???

 

Thanks

 

B)

 

Hi,

 

make the side frame wider by 1-2pgx, it will look even better then! Nice layout!!!

 

As for your search question, you just have to add searching in manufacturer to your select statement's where clause ... no big deal.

 

:-)

Monika

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

advanced_search_results.php, around line 220

 

  if (isset($search_keywords) && (sizeof($search_keywords) > 0)) {
   $where_str .= " and (";
   for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {
     switch ($search_keywords[$i]) {
       case '(':
       case ')':
       case 'and':
       case 'or':
         $where_str .= " " . $search_keywords[$i] . " ";
         break;
       default:
         $keyword = tep_db_prepare_input($search_keywords[$i]);
         $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'";
         if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'";
         $where_str .= ')';
         break;
     }
   }
   $where_str .= " )";
 }

 

:-)

Monika

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

  • 2 weeks later...

Hi Monika

 

Just had the chance to look at the above code in the above file and it appears to be exactly like the code in my advanced_search_results.php??????

 

Am I being completely stupid her or should your code be different to the code I have??????

 

If it is the same and you are just showing me whereabouts to put the changes, I thank you for that but have absolutely no idea what to do!?

 

Cheers

 

Pete

Link to comment
Share on other sites

I just checked your site, you're right it's not working. Do you have the default file from the osC download?

 

I also checked one of my pages, and it does work there ...

http://www.painted4kids.com/advanced_search.php

 

choose home run or any other collection for search

 

Have you changed/renamed database fields?

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Hi Monika

 

Yes I think I do have the original........does this help???

 

I'm totally confused now...........should the search on my site use manufacturers and it doesn't???

 

Is home run on your site a manufacturer?????

 

Thanks

Link to comment
Share on other sites

Hi Monika

 

Yes I think I do have the original........does this help???

 

I'm totally confused now...........should the search on my site use manufacturers and it doesn't???

 

Is home run on your site a manufacturer?????

 

Thanks

 

 

yep "home run" is in the collections box, I use collections instead of manufacturers. The default search is to search in products name, model and manufacturer ...

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...