Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Keyword Search Results

    When I enter a keyword, let’s say “burberry,” in the search box, the results page shows “Advanced Search” on top, but doesn’t display the keyword that was used in the results.

    http://designerperfumesnob.authsafe....erry&x=21&y=11

    A competitors website shows: Your search for ‘burberry' returned 25 results

    I don’t want to copy that exactly, but I like the idea of using the keyword in the results. It makes me feel as if the site is listening to me, and the impersonal ‘Advanced Search,’ is a term I have always disliked.

  2. #2
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Keyword Search Results

    in /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_advanced_search_result_default.php

    find:
    PHP Code:
    <div class="centerColumn" id="advSearchResultsDefault"
    right below it add:
    PHP Code:
    <?php
      
    if (isset($_GET['keyword']) && $_GET['keyword'] != HEADER_SEARCH_DEFAULT_TEXT  && $_GET['keyword'] != KEYWORD_FORMAT_STRING) {
        
    $keywords $_GET['keyword'];
      }
    ?>
    find:
    PHP Code:
    <?php echo HEADING_TITLE;?>
    replace with:
    PHP Code:
    <?php echo HEADING_TITLE $keywords HEADING_TITLE_END;?>
    then create a file called extra_advanced_search_result_difines.php in /includes/languages/english/extra_definitions/YOUR_TEMPLATE_NAME

    add this to that:
    PHP Code:
    <?php
    define
    ('HEADING_TITLE''Searches related to<font color="#000000"> ');
    define('HEADING_TITLE_END''</font>');
    ?>
    change accordingly, add a span around $keywords to alter via css!

  3. #3
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Re: Keyword Search Results

    I was okay until I got to this part:

    then create a file called extra_advanced_search_result_difines.php in /includes/languages/english/extra_definitions/YOUR_TEMPLATE_NAME

    add this to that:


    PHP Code:

    <?php
    define('HEADING_TITLE', 'Searches related to<font color="#000000"> ');
    define('HEADING_TITLE_END', '</font>');
    ?>
    change accordingly, add a span around $keywords to alter via css!

    Then I got totally lost. Creating a file, change accordingly, add a span, all has me stumped. The change accordingly really has me worried because it makes me think this would have to be changed for each product.

  4. #4
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Keyword Search Results

    no, adding it the way it is, works.

    as an option you can add a span to change the way its displayed, font-face, font-weight, color, ect. guess I should have explained that part a little better

  5. #5
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Re: Keyword Search Results

    Something didn't work right. I changed /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_advanced_search_result_default.php to look this way:

    <div class="centerColumn" id="advSearchResultsDefault">
    <?php
    if (isset($_GET['keyword']) && $_GET['keyword'] != HEADER_SEARCH_DEFAULT_TEXT && $_GET['keyword'] != KEYWORD_FORMAT_STRING) {
    $keywords = $_GET['keyword'];
    }
    ?>
    <h1 id="advSearchResultsDefaultHeading"></h1>
    <?php echo HEADING_TITLE . $keywords . HEADING_TITLE_END;?>

    and I created a new file extra_advanced_search_result_defines.php in /includes/languages/english/extra_definitions/YOUR_TEMPLATE_NAME
    and added the following:

    <?php

    define('HEADING_TITLE', 'Searches related to<font color="#000000"> ');

    define('HEADING_TITLE_END', '</font>');

    ?>

    So now, the problem is on the main page it has that Searches Related to as seen here
    http://designerperfumesnob.authsafe.com/

    And when you actually do a search, for example I did a search for Chloe and these were the results:

    http://designerperfumesnob.authsafe....hloe&x=20&y=16

    HELP!!

  6. #6
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Re: Keyword Search Results

    I meant to add that on the left, see Shop By Designer and scroll down to Chloe, it will return 16 results.

  7. #7
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Keyword Search Results

    start by renaming extra_advanced_search_result_difines.php to advanced_search_result.php

  8. #8
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Keyword Search Results

    Quote Originally Posted by traytray View Post
    I meant to add that on the left, see Shop By Designer and scroll down to Chloe, it will return 16 results.
    that is the manufactures sidebox, has nothing to do with keyword or searches

  9. #9
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Keyword Search Results

    try removing the html like so

    <?php

    define('HEADING_TITLE', 'Searches related to');

    define('HEADING_TITLE_END', '');

    ?>

  10. #10
    Join Date
    May 2012
    Posts
    564
    Plugin Contributions
    0

    Default Re: Keyword Search Results

    Quote Originally Posted by rbarbour View Post
    try removing the html like so

    <?php

    define('HEADING_TITLE', 'Searches related to');

    define('HEADING_TITLE_END', '');

    ?>
    When I removed the html I couldn't get the site to open at all, so I put it back.

    Using Chloe as asn example, is it supposed to look like Searches related to Chloe? There would be nothing at all on the main page, right?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Search - including or ignoring "and" as first keyword in search query
    By nikerymis in forum General Questions
    Replies: 0
    Last Post: 27 Jan 2014, 08:44 PM
  2. Replies: 1
    Last Post: 9 May 2008, 08:48 AM
  3. Is there a way to have advanced search results open the results in a new window?
    By member in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Mar 2008, 08:27 PM
  4. Search results ordered by products_name LIKE $keyword
    By Yako in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 14 Dec 2006, 01:36 PM
  5. Replies: 8
    Last Post: 5 Dec 2006, 10:52 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR