Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Search Results From Category Name


veverkap

Recommended Posts

Posted

Is there any tweak I could make to the advanced_search_result.php page that would allow me to include the cateogory name in the search. For example, if you have a product called Kittens Scarf in the Category Cat and somebody did a search for cat, it wouldn't show Kittens Scarf. I know that one way to do it is to put everything into HTML comments, but there has to be a way to tweak the search itself to add in the products categories. Anyone, please? I have a 1000+ product database and don't want to have to type it in individually.

 

Patrick

[email protected]

Patrick

  • 6 months later...
  • 1 year later...
  • 4 months later...
  • 3 months later...
Posted
Is there any tweak I could make to the advanced_search_result.php page that would allow me to include the cateogory name in the search.  For example, if you have a product called Kittens Scarf in the Category Cat and somebody did a search for cat, it wouldn't show Kittens Scarf.  I know that one way to do it is to put everything into HTML comments, but there has to be a way to tweak the search itself to add in the products categories.  Anyone, please?  I have a 1000+ product database and don't want to have to type it in individually.

Patrick

[email protected]

 

 

advance search results utilizes the product_listing module and as such only displays products that way.

 

I "tweaked" it myself a little by also having search results from the articles I have.

 

so my structure in advance search results looks like this:

 

1) create product query

2) include product_listing.php

3) create article query

4) include article_listing.php

 

 

So you could write a category listing module and attach it to the advance search results

Treasurer MFC

  • 2 months later...
Posted

I found the easiest way was to make a new column under product_descriptions table called it product_keywords. Ran a shot of code that took the three category levels and combined them into one string separated by spaces & '>'s. Included this column under the search query sql statement and it works great. Plus it doesn't slow things down by making the server lookup the every part's category to search it. I have over 60,000#s (only 3250#s are in categories) and this doesn't slow things down plus lets me use the actual order# as the product name.

Kind of an easy fix with minimal coding and the keyword field allows for more possibilities other than just categories.

-Jack

Archived

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

×
×
  • Create New...