Thread: Instant Search

Page 3 of 23 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 221
  1. #21
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,571
    Plugin Contributions
    30

    Default Instant search for the Admin categories

    Quote Originally Posted by AyoobG View Post
    3. About the Admin panel! to be honest i have no plans in creating it, but if anyone other is interested, then by all means feel free to take over
    Hmm, I have just invested a whole five minutes in looking at this...which is my limit on javascript.

    Apart from the obvious stuff, getting the js to load on the categories.php and changing the "watched" box name from "keyword" to "searches", off the top of your head is there anything else that should need changing for the admin?
    thanks
    Steve
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  2. #22
    Join Date
    Nov 2011
    Posts
    34
    Plugin Contributions
    1

    Default Re: Instant search for the Admin categories

    Quote Originally Posted by torvista View Post
    Hmm, I have just invested a whole five minutes in looking at this...which is my limit on javascript.

    Apart from the obvious stuff, getting the js to load on the categories.php and changing the "watched" box name from "keyword" to "searches", off the top of your head is there anything else that should need changing for the admin?
    thanks
    Steve

    Hi Steve,

    The links that will be generated once the user clicks on the search result will have to be different for the admin file. This can be done by editing the js file:

    Replace:
    index.php?main_page=product_info&products_id=

    with:
    categories.php?blahblahblah

    but i have to warn you that links must be exactly structured as how they are displayed in the admin file links, otherwise your whole shop can mess up.

    too much headache i would say!

  3. #23
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,571
    Plugin Contributions
    30

    Default Re: Instant Search

    too much headache i would say!
    Thanks! You are right, there are bigger fish to fry than this!
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  4. #24
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Instant Search

    Is it possible to show current stock levels for product results?

  5. #25
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Instant Search

    Quote Originally Posted by DigitalShadow View Post
    Is it possible to show current stock levels for product results?
    I've tried my hardest, and I can't figure out how to edit the code to use the 'c' return field to display the stock level for the product. It shouldn't be too hard as it is setup to show the product count for categories.

  6. #26
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Instant Search

    Done it.

    Code:
    "SELECT " . TABLE_PRODUCTS_DESCRIPTION . ".products_name, " . TABLE_PRODUCTS . ".products_quantity

    Code:
    		$prodquantity = ($dbProducts->fields['products_quantity']);
    		$prodResult = strip_tags($dbProducts->fields['products_name']);
    		if (strtolower(substr($prodResult,0,strlen($wordSearch))) == strtolower($wordSearch)){
    			$results[] = array(
    				//we have 4 seperate variables that will be passed on to instantSearch.js
    				//'q' is the result thats been found
    				//'c' is the number of item within a category search (we leave this empty for product search, look at the example bellow for category search)
    				//'l' is used for creating a link to the product or category
    				//'pc' lets us know if the word found is a product or a category
    				'q'=>$prodResult,
    				'c'=>$prodquantity,
    				'l'=>$dbProducts->fields['products_id'],
    				'pc'=>"p"
    			);
    		}else{
    			$resultsAddAfter[] = array(
    				'q'=>$prodResult,
    				'c'=>$prodquantity,
    				'l'=>$dbProducts->fields['products_id'],
    				'pc'=>"p"
    yay

  7. #27
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Instant Search

    It would be great to be able to separate the in stock results from those out of stock.... hmmmm

  8. #28
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Instant Search

    figure that out too,

    modify this

    if (strtolower(substr($prodResult,0,strlen($wordSearch))) == strtolower($wordSearch)){
    $results[] = array(

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

    Default Re: Instant Search

    Quote Originally Posted by DigitalShadow View Post
    figure that out too,

    modify this

    if (strtolower(substr($prodResult,0,strlen($wordSearch))) == strtolower($wordSearch)){
    $results[] = array(


    Not Bad!

  10. #30
    Join Date
    Dec 2010
    Posts
    12
    Plugin Contributions
    0

    Default Re: Instant Search

    Thank you AyoobG for your long answer!
    For my customized need, I have found a very similar add-on from: advancebydesign dot com , which exactly do what I expect. many thanks to Robert, the author.
    After testing it for some time, I also made a little changes to it to resolve known issues:

    1.change:

    $sql = "SELECT products_name,products_id from ". TABLE_PRODUCTS_DESCRIPTION ." ORDER BY products_name ASC";

    to:

    $sql = "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 language_id = '" . (int)$_SESSION['languages_id'] . "'
    ORDER BY " . TABLE_PRODUCTS_DESCRIPTION . ".products_name ASC";


    2. to disable links in the search results, change:

    1:0

    to

    0:0

    3.
    edit the correponding file where you plan to put the search box, such as: tpl_search_header.php, tpl_advance_search_default.php, tpl_search.php

    the only remaining problem is that it comflicts with almost all the JS-related add-ons, such as "JQ lightbox, click-show-hide-category, bcastr header banner player", not big issue, all the add-ons still work
    if you look at the source code, once we begin to type in the search box, all the loaded files from this add-on come into the <body> part from the <header> part.

 

 
Page 3 of 23 FirstFirst 1234513 ... 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