Thread: Instant Search

Results 1 to 10 of 249

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,826
    Plugin Contributions
    31

    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: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  2. #2
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Instant Search

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

  3. #3
    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.

  4. #4
    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

  5. #5
    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

  6. #6
    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(

  7. #7
    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!

 

 

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