Thread: Instant Search

Page 1 of 14 12311 ... LastLast
Results 1 to 10 of 135
  1. #1
    Join Date
    Nov 2011
    Posts
    34
    Plugin Contributions
    1

    Default Instant Search

    Instant Search v1.0.0
    Just like googles instant search feature I’ve made one for zencart. Instant search is a new search enhancement that shows results as you type.

    Tried and tested and works on all major browsers including smart phones.

    Check out the addon section. http://www.zen-cart.com/index.php?ma...oducts_id=2032

  2. #2
    Join Date
    Dec 2011
    Posts
    20
    Plugin Contributions
    0

    Default Re: Instant Search

    Very nice contribution, thank you!
    One question for now: I noticed that the results for products include out of stock or disabled products.
    I tried this on 1.39h, thanks again for simple installation and details readme!

  3. #3
    Join Date
    Nov 2011
    Posts
    34
    Plugin Contributions
    1

    Default Re: Instant Search

    To ignore disabled or zero stock items replace:

    $sqlProduct = "SELECT products_name, products_id
    FROM " . TABLE_PRODUCTS_DESCRIPTION . "
    WHERE (products_name LIKE :wordSearchPlus:)
    OR (LEFT(products_name,LENGTH(:wordSearch:)) SOUNDS LIKE :wordSearch:)
    ORDER BY
    field(LEFT(products_name,LENGTH(:wordSearch:)), :wordSearch:) DESC,
    products_viewed DESC
    LIMIT 2";


    With this:

    $sqlProduct = "SELECT " . TABLE_PRODUCTS_DESCRIPTION . ".products_name, " . TABLE_PRODUCTS_DESCRIPTION . ".products_id, " . TABLE_PRODUCTS . ".products_status
    FROM " . TABLE_PRODUCTS_DESCRIPTION . ", " . TABLE_PRODUCTS . "
    WHERE " . TABLE_PRODUCTS . ".products_id = " . TABLE_PRODUCTS_DESCRIPTION . ".products_id
    AND " . TABLE_PRODUCTS . ".products_status <> 0
    AND ((products_name LIKE :wordSearchPlus:) OR (LEFT(" . TABLE_PRODUCTS_DESCRIPTION . ".products_name,LENGTH(:wordSearch:)) SOUNDS LIKE :wordSearch:))
    ORDER BY
    field(LEFT(" . TABLE_PRODUCTS_DESCRIPTION . ".products_name,LENGTH(:wordSearch:)), :wordSearch:) DESC,
    " . TABLE_PRODUCTS_DESCRIPTION . ".products_viewed DESC
    LIMIT 2";

  4. #4
    Join Date
    Dec 2011
    Posts
    20
    Plugin Contributions
    0

    Default Re: Instant Search

    That fixed it, thanks!

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,137
    Plugin Contributions
    29

    Default Re: Instant Search

    Great effort, well done!

    In case anyone else is fiddling with it like me, to avoid duplicated effort I've already done this:

    1) Added support for multiple languages.
    2) The created category link did not use the full path: necessary when categories are nested.
    3) Added user-defined variables into code to define the number of results returned and switching on/off products and/or categories and category count.
    4) Tidied up sql.
    4) Changed names of jscript and ccs files and thereby removed the need for jscript .php
    5) CSS for IE7: still on this one.

    I'm looking at formatting the results more...

    regards
    Steve
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  6. #6
    Join Date
    Jul 2011
    Location
    Oregon
    Posts
    16
    Plugin Contributions
    0

    Default Re: Instant Search

    Have you submitted your revisions so that they are included with AyoobG add-on download?

    I fetched the files as currently posted on Zen Cart's Add-On page, but the readme does not include any of your modifications.

  7. #7
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,137
    Plugin Contributions
    29

    Default Re: Instant Search

    Have you submitted your revisions so that they are included with AyoobG add-on download?
    No. I am still fiddling with it but I don't have much time at the moment.

    Note that there is nothing wrong with the current version, unless you need items 1 and 2 as I did.

    Steve
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  8. #8
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    335
    Plugin Contributions
    0

    Default Re: Instant Search

    Hello,

    Looking to use this on our www.efpsupply.com, can I please have better instructions to get this working ?
    such as how to enable it or where does the search.php script go ?

    Thx,
    Erick

  9. #9
    Join Date
    Nov 2011
    Posts
    34
    Plugin Contributions
    1

    Default Re: Instant Search

    Quote Originally Posted by gloerick View Post
    Hello,

    Looking to use this on our www.efpsupply.com, can I please have better instructions to get this working ?
    such as how to enable it or where does the search.php script go ?

    Thx,
    Erick
    Hi,

    1. You need to place searches.php into the root directory (i.e. the first folder), this folder will contain the first most files such as index.php and page_not_found.php...

    once done try to see if it works.

    2. Also i checked your code and the following 3 files are in their correct places:

    jquery.js
    instantSearch.js
    instantSearch.css


    however you can remove jquery.js from your code because you already have a file called jscript_jquery-1.4.min.js. Both of these files are infact the same. To remove this file open jscript_instantSearch.php and remove the following piece of code:

    echo '<script type="text/javascript" src="' . DIR_WS_TEMPLATE . 'jscript/jquery.js"></script>' . "\n";

  10. #10
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    335
    Plugin Contributions
    0

    Default Re: Instant Search

    Hello,

    Thank you for the response, and it seems to all be in place now, but is not working, can you please take a look at www.efpsupply.com and try the search and let me know as I see no differance in the search.

    Thx Much,
    Erick

 

 
Page 1 of 14 12311 ... LastLast

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

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