Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Advanced Search - Additional Keyword Form Blanks & Handling

    I want to have additional blanks on the advanced search form.

    I tried creating new fields, and setting each (additional) field name to ‘keyword'. This ends up creating a string (as part of the URL that is generated) with more than one &keyword= field.

    BUT---
    Only the LAST keyword is considered when the search is executed; anything preceding it is ignored.

    Further, if the second blank is left blank, but the first has user entered data, it will return an error message (as I included the same value="" for the second blank if left as default.)

    Obviously, this isn't working.


    What about setting each blank field with a different name?

    How can the search engine be modified so that it accepts the other fields as additional
    search keywords that are searched as "AND" with each other blank field?

    //&keyword=die+hard&categories_id=10&inc_subcat=1&manufacturers_id=4&pfrom=1&pt o=5 0&dfrom=01%2F01%2F2003&dto=12%2F20%2F2005

    What file decodes this and performs an SQL inquiry with the results?


    How does the header_php.php file associated with the advanced search page work? What does it do?

  2. #2
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Advanced Search - Additional Keyword Form Blanks & Handling

    Researching this further, I can't seem to find much information on this board about how the ZenCart search works.

    Does anyone have a knowledge of which files are involved, and what function each performs?

    I know that tpl_advanced_search_default.php draws the advanced search page, and creates a form, the contents of which are sent as part of the URL that is loaded after a user hits the search button.

    But what role does the modules/pages/advanced_Search/header_php.php file play?

    Can someone please help explain what each statement, contained in that file, such as:
    $sData['keyword'] = (isset($_GET['keyword']) ? zen_output_string($_GET['keyword']) : zen_output_string(KEYWORD_FORMAT_STRING));
    actually does?

    I *thought* that this file builds the URL...but as long as a new field is named in the advanced search form, it always seems to end up as part of the advanced search results page URL that is generated, without any alteration to the header_php.php file.

    Any help would be greatly appreciated.

    As to more about WHY I'm asking all this....

    I am well aware that users can AND / OR results using the existing keyword blank on the default advanced search form, but I still wish to have multiple blanks, each requesting a different type of user entered data.

 

 

Similar Threads

  1. v150 [Fixed v1.5.1] Improper handling of '0' as search keyword
    By data_digger in forum Bug Reports
    Replies: 1
    Last Post: 19 Sep 2012, 03:52 AM
  2. Advanced Search: keyword not required
    By lndlyb4 in forum General Questions
    Replies: 1
    Last Post: 12 Oct 2009, 11:49 PM
  3. Advanced search input form length
    By Joseph M in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 May 2008, 03:31 AM
  4. Keyword As A Dropdown Box In Advanced Search
    By SteveCollins in forum General Questions
    Replies: 6
    Last Post: 26 Apr 2008, 02:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg