Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need For a Specialized Search Tool


starpowersports

Recommended Posts

Our store is not open as yet, but as we get closer we have realized that we desperately need a search tool by category also, as we sell parts and accessories.

 

For example, when a customer is looking for an exhaust system he/she may not know what system is right for their machine... therefore we need to provide a search tool that identifies their machine make, model, year and then the proper exhaust systems will display that work with that machine.

 

Without this type of search tool provided within our store, hundreds of hits will return and the customer will be lost, thus we will lose a customer [!] so whatever application can be made available will be a great benefit to us!

 

If someone knows how we can incorporate such a search tool, please advise, thank you very much!

 

Babs

Babs

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

"What has been, has been, what will come, will come.

Our job is to learn from the past, keep looking ahead, and find joy in each moment."

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Link to comment
Share on other sites

Look catalog\advanced_search_result.php There is a "for" loop like this line

 

    for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {

 

Few lines below there are the sql queries that perform the search through certain tables like products description. You could add categories description as well.

Link to comment
Share on other sites

Look catalog\advanced_search_result.php There is a "for" loop like this line

 

 ? ?for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {

 

Few lines below there are the sql queries that perform the search through certain tables like products description. You could add categories description as well.

 

 

Hello enigma1!

 

Thank you for your reply ...

 

Oh silly me ... did I neglect to mention I know ZERO about modifiying any OSC application? Yep! ...

 

You see, the primary reason our store is not open yet, is because I haven't got a *clue* what's going on here --- (well, a little clue, is almost no clue!)

 

OSC is provided to us as an "install" option with our web host service.

and...

They do NOT provide any support for any legacy application offered.

 

I worked through the "set up my store" stuff, but learning the in's and out's of and how to make modifications is beyond my html and tiny javascripting abilities!

 

So, I ordered some ebooks from one of the fella's I found on the forums within ...

 

Then I began to learn about modifications - but still couldn't understand what I was doing and I required a better understanding----------

 

This took me to ordering a book "Build Your Own Database Driven Website Using PHP and MYSQL --------- helpful, but not the secret weapon I was and still am in need of; so, back to the forums.

 

And ...

 

Still, I continue striving to L E A R N this stuff :'(

 

I would greatly appreciate it if you could be more specific about your suggested direction, thank you!

 

Babs

Babs

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

"What has been, has been, what will come, will come.

Our job is to learn from the past, keep looking ahead, and find joy in each moment."

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Link to comment
Share on other sites

how do you classify your products ?

Do you have this data in separate fields, or is it all implied in the category tree ?

 

I've been working on something to filter products on my site. I've just enabled it for all.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

The file I mentioned performs the search based on the parameters passed from the customer. Study the file if you get the chance

 

There is a bunch of php code at the beginning that validates the various parameters passed during search. If everything is good there is the HTML code that creates the final page. That starts basically when you see

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

Till the end of the html body you have the various queries and processing for the final output. Now you will notice products and categories fields come up often and to achieve your specialized search you will have to combine the basic products description/name search with the categories description. If either case is true you display the results. Now since a category contains the same description for all products you will have to adjust it so it will print out the right results you need.

 

Now for an example if you wanted say to search the model for the products just below this line:

          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) . "%'";

 

you would add a line like this in that file just below

          if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or p.products_model like '%" . tep_db_input($keyword) . "%'";

 

For categories you will need to add to the search the categories description sql table and enhance the search options meaning you could add a tick box so the user can select to search from the categories.

Link to comment
Share on other sites

I think the open question is, how will you organize your catalog.

How many category levels do you need to take into account to combine with product description results ?

Ie, grandfather category name searching, father category name, and child description, or grandchild ?

or did I misunderstand the question ?

 

I think generally, something like this should be done by a multi-dimensional search based on product data, not by the data implied through the catalog tree traversed.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

how do you classify your products ?

Do you have this data in separate fields, or is it all implied in the category tree ?

 

I've been working on something to filter products on my site. I've just enabled it for all.

 

 

Hello bruyndoncx,

 

We have three [3] main categories which, in turn, each have various sub categories.

 

1. Motorcycles

2. ATVs

3. Snowmobiles

 

Cat 1. [motorcycles] has many sub categories, but I am contemplating a search tool that would allow a pull down menu for make [i.e. Yamaha, Harley-Davidson, etc.] then an additional sub- pull down menu for models of the manufacturer and then the next level of pull down for the year......... Or perhaps we start with the year, then the make and then the model.

By doing it this way, I can eliminate having to create additional sub-categories of the category for motorcycle which would have street or off-road. But the street motorcycles are numerous...

such as the Cruisers I would need to keep it simple by either selecting American Cruiser or Metric Cruiser. then there are the sport bikes and athe Europeans and then there are the Touring bikes too.....

 

So you see, it would be best to just create the search by manufacturer, model and year.

 

The ATVs and the Snowmobiles machines are * NOT * as messy for * requiring * multiple categories, but mind as well keep the same method in place for each of them as well.

 

-------------------------------------------------------

 

Once the criteria is entered, then a list of all of the matching products for that particular machine would be presented; obviously there will be 1000s of products that must be categorized such as hard body parts, engine parts, customizing, etc.

----- This particular area has already been created as sub-categories for each of the three main categories.

 

As to your another question:

Do you have this data in separate fields, or is it all implied in the category tree ?

 

 

I am uncertain as to what you are asking, can you rephrase it if I haven't already explained what I have already done.

 

 

 

Some of our suppliers are fast at work to link their catalogs to their dealer / vendor clients who have web sites, such as ourselves, but they are still in the project stage; therefore we have been hoping to bring our physical store to the internet sometime in this year.

 

More info then you probably asked for, but that will give an idea what we are trying to accomplish. thanks for your interest! Hope you have a solution!

 

Babs

Babs

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

"What has been, has been, what will come, will come.

Our job is to learn from the past, keep looking ahead, and find joy in each moment."

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Link to comment
Share on other sites

The file I mentioned performs the search based on the parameters passed from the customer. Study the file if you get the chance

 

There is a bunch of php code at the beginning that validates the various parameters passed during search. If everything is good there is the HTML code that creates the final page. That starts basically when you see

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

Till the end of the html body you have the various queries and processing for the final output. Now you will notice products and categories fields come up often and to achieve your specialized search you will have to combine the basic products description/name search with the categories description. If either case is true you display the results. Now since a category contains the same description for all products you will have to adjust it so it will print out the right results you need.

 

Now for an example if you wanted say to search the model for the products just below this line:

 ? ? ? ? ?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) . "%'";

 

you would add a line like this in that file just below

 ? ? ? ? ?if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or p.products_model like '%" . tep_db_input($keyword) . "%'";

 

For categories you will need to add to the search the categories description sql table and enhance the search options meaning you could add a tick box so the user can select to search from the categories.

 

 

 

Thank You ... very much!

Babs

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

"What has been, has been, what will come, will come.

Our job is to learn from the past, keep looking ahead, and find joy in each moment."

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...