Thread: Instant Search

Results 1 to 10 of 249

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Instant Search

    Now that would be a very nice and logical modification. Does anyone know how to do this?



    Quote Originally Posted by triumph View Post
    Hi

    It's very good contrib!

    It's working perfect to me on 1.39h, but there is 1 point to update!

    I discovered that if you have multiple products with the same keywords but in a different order, only the results with the words in the same order as the research emerge. I need all the products with the same keywords in any order can emerge!

    thanks for you help!

  2. #2
    Join Date
    Jun 2009
    Posts
    19
    Plugin Contributions
    0

    Default Re: Instant Search

    The addon does not generate full cPath for categories, for example.. if the product is in subcategory
    index.php?main_page=index&cPath=35_37_43

    search script only generates
    index.php?main_page=index&cPath=43

    How can I make the script to generate full cpath?

  3. #3
    Join Date
    Jun 2009
    Posts
    19
    Plugin Contributions
    0

    Default Re: Instant Search

    Quote Originally Posted by Loter View Post
    The addon does not generate full cPath for categories, for example.. if the product is in subcategory
    index.php?main_page=index&cPath=35_37_43

    search script only generates
    index.php?main_page=index&cPath=43

    How can I make the script to generate full cpath?

    I've added a function in searches.php that generates full cpaths

    function getcPath($catid)
    {
    global $db;
    $retstr=0;
    if($catid!=0)
    {
    $sqlcPath = "SELECT parent_id from ".TABLE_CATEGORIES." where categories_id=".mysql_real_escape_string($catid);
    //echo "<br>".$sqlcPath."<br>";
    $dbcPath = $db->Execute($sqlcPath);
    if ($dbcPath->RecordCount() > 0) {
    $retstr = $dbcPath->fields['parent_id'];
    }
    }else
    {
    $retstr = 0;
    }
    return $retstr;
    }
    function calccPath($catid)
    {
    $sep = "_";
    $retstr = $catid;
    do
    {
    $currpath = getcPath($catid);
    $catid=$currpath;
    if($catid!=0)
    {
    $retstr = $catid.$sep.$retstr;
    }
    }while($currpath!=0);
    return $retstr;
    }

    then below:
    $prodResult = strip_tags($dbCategories->fields['categories_name']);

    added:
    $dbCategories->fields['categories_id'] = calccPath($dbCategories->fields['categories_id']);

  4. #4
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Instant Search

    I only want to use this mod on a particular new page to conduct a search of a particular new DB table.

    From the readme.htm, I am wondering if it would be better to change the following file placements from

    searches.php
    includes/templates/MYTEMPLATE/css/instantSearch.css
    includes/templates/MYTEMPLATE/jscript/instantSearch.js
    includes/templates/MYTEMPLATE/jscript/jquery.js
    includes/templates/MYTEMPLATE/jscript/jscript_instantSearch.php

    to

    searches.php
    includes/templates/MYTEMPLATE/css/instantSearch.css
    includes/modules/mypage/instantSearch.js
    includes/templates/MYTEMPLATE/jscript/jquery.js
    includes/modules/mypage/jscript_instantSearch.php


    OR

    to follow the original readme instructions and just add the highlighted line to instantSearch.js after Line 36

    //var inputBox = $('#navMainSearch > form[name="quick_find_header"] > input[name="keyword"]');
    //var inputBox = $('#navColumnTwoWrapper > form[name="quick_find_header"] > input[name="keyword"]');
    //var inputBox = $('#searchContent > form[name="quick_find"] > input[name="keyword"]');
    var inputBox = $('#mypage > form[name="mysearch"] > input[name="keyword"]');


    Thanks

  5. #5
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Instant Search

    Line 145 of searches.php has

    Code:
    foreach ($resultsAddAfter as &$value) {
    Could someone please confirm whether the ampersand & is a typo or whatever, and that line should read

    Code:
    foreach ($resultsAddAfter as $value) {
    thanks in advance

  6. #6
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Instant Search

    Further to above, the offending code can be seen in this post.

    http://www.zen-cart.com/showthread.p...31#post1107931

    Ctrl_F &$

  7. #7
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Instant Search

    Solved. &$var refers to the variable reference rather than a variable value.

 

 

Similar Threads

  1. Instant Quote
    By Congerman in forum General Questions
    Replies: 2
    Last Post: 15 Aug 2012, 12:29 PM
  2. Instant Coupon
    By Mickmo68 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 22 Dec 2008, 08:19 PM
  3. Instant Delivery?
    By eaglewu in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jul 2007, 09:30 AM
  4. changes instant
    By chufty bill in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Sep 2006, 07:12 PM

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