Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to stop an empty 'quick find' box going to Advanced Find


Matt-u

Recommended Posts

I too would be up for any info on this one from any gurus lurking out there. In fact, if some soul could tell me how to completely disable the Advanced Search option that would be sweet.

 

I thought I had done enough when I removed the link from the Search box but a failed search takes the punter straight to it. Darn!

Link to comment
Share on other sites

While we're waiting and hoping for an answer, another place you'll have to remove a link to the advanced search is in the headerNavigation bar.

 

When you get to search results, if you click search in the navigation bar along the top you go to 'Advanced Search' also.

 

Matt

Link to comment
Share on other sites

Where do you want the page to go to when someone clicks on the link that takes them to the advanced search instead?

 

Find this in application_top.php

define('FILENAME_ADVANCED_SEARCH', 'advanced_search.php');

& change advanced_search.php to the file you want it to point to instead.

Link to comment
Share on other sites

Thanks Mom, but I actually want to get shot of the advanced search (AS) completely, not just physical links to it, which I've done.

 

The thing is even if there are no clickable links to it, the application can still default to the AS page when the user clicks search and no results are found.

 

I'm no fan of this functionality, I think users are frequently put off by AS pages, it is making finding what they want more complicated and, as I said, my stock will be simple to search.

 

Any ideas?

Link to comment
Share on other sites

When no results are found, the page shown will be whatever you define as FILENAME_ADVANCED_SEARCH, as above. If you want that to be a simple search, you can copy search.php into advanced_search.php & leave the define set to advanced_search.php. You need to make sure you keep the parts that call the header, application_top & footer files.

Link to comment
Share on other sites

why don't you just edit advance_search.php and comment all the fields that you don't need. leaving only the search input..

 

So when someone input a word in the search field and the word is not there, it will be taken to the advance_search.php file that looks just like the quick search...

 

Don't delete the unwanted fields. just comments.

Link to comment
Share on other sites

Yup. I see where you are going.

 

Methinks I will try and build a page from scratch, with just the basic search function, ripped from the default search box, and tailored to look as I want.

 

Keen now to get home and try this as it has been bugging me for a while.

 

Thanks again for the input and helping out a numpty.

Link to comment
Share on other sites

Hey, not sure if this is exactly what I did, it all got a little messy and fraught, but it appears to work;

 

I added a definition in includes/filenames.php

 

define('FILENAME_FAILED_SEARCH','failed_serch.php');

 

I saved out a version of includes/english/conditions.php as failed_search.php and changed the text there to reflect the new page that I wanted,

 

I also copied out a version of conditions.php that lies in the directory root as failed_search.php and tweaked calls to FILENAME_CONDITIONS to my new filename - FILENAME_FAILED_SEARCH.

 

Hey presto! No more Advanced Search.

 

Thanks for the help and steerage.

 

Until the next problem arises....

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...