Thread: Instant Search

Results 1 to 10 of 249

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,893
    Plugin Contributions
    96

    Default Re: Instant Search

    Using instantSearch v4.0.0 on a freshly-minted zc158a installation with a clone of the responsive_classic template on PHP 7.4.30.

    When I type in the search box, I'm getting the following log:
    Code:
    [03-Apr-2023 17:13:33 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: strip_tags() expects parameter 1 to be string, null given in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php:282
    Stack trace:
    #0 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(282): strip_tags(NULL)
    #1 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(196): zcAjaxInstantSearch->formatDropdownResults(Array)
    #2 C:\xampp\htdocs\mysite\ajax.php(85): zcAjaxInstantSearch->instantSearch()
    #3 {main}
      thrown in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php on line 282
    
    [03-Apr-2023 17:13:33 Europe/Berlin] Request URI: /mysite/ajax.php?act=ajaxInstantSearch&method=instantSearch, IP address: 127.0.0.1
    --> PHP Fatal error: Uncaught TypeError: strip_tags() expects parameter 1 to be string, null given in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php:282
    Stack trace:
    #0 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(282): strip_tags(NULL)
    #1 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(196): zcAjaxInstantSearch->formatDropdownResults(Array)
    #2 C:\xampp\htdocs\mysite\ajax.php(85): zcAjaxInstantSearch->instantSearch()
    #3 {main}
      thrown in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php on line 282.

  2. #2
    Join Date
    Jun 2021
    Posts
    42
    Plugin Contributions
    2

    Default Re: Instant Search

    Quote Originally Posted by lat9 View Post
    Using instantSearch v4.0.0 on a freshly-minted zc158a installation with a clone of the responsive_classic template on PHP 7.4.30.

    When I type in the search box, I'm getting the following log:
    Code:
    [03-Apr-2023 17:13:33 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: strip_tags() expects parameter 1 to be string, null given in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php:282
    Stack trace:
    #0 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(282): strip_tags(NULL)
    #1 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(196): zcAjaxInstantSearch->formatDropdownResults(Array)
    #2 C:\xampp\htdocs\mysite\ajax.php(85): zcAjaxInstantSearch->instantSearch()
    #3 {main}
      thrown in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php on line 282
    
    [03-Apr-2023 17:13:33 Europe/Berlin] Request URI: /mysite/ajax.php?act=ajaxInstantSearch&method=instantSearch, IP address: 127.0.0.1
    --> PHP Fatal error: Uncaught TypeError: strip_tags() expects parameter 1 to be string, null given in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php:282
    Stack trace:
    #0 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(282): strip_tags(NULL)
    #1 C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php(196): zcAjaxInstantSearch->formatDropdownResults(Array)
    #2 C:\xampp\htdocs\mysite\ajax.php(85): zcAjaxInstantSearch->instantSearch()
    #3 {main}
      thrown in C:\xampp\htdocs\mysite\includes\classes\ajax\zcAjaxInstantSearch.php on line 282.
    Fixed in this commit that I'll include in the next release: https://github.com/marco-pm/zencart_...3a4f49a97f7072

    In short, replace $img !== '' with !empty($img)

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,893
    Plugin Contributions
    96

    Default Re: Instant Search

    Thanks for the quick response! I can confirm that your change corrected the issue.

  4. #4
    Join Date
    Jan 2019
    Location
    UK
    Posts
    113
    Plugin Contributions
    0

    Default Re: Instant Search

    Havin a problem installing this, I get "Column 'products_description' cannot be part of FULLTEXT index" when trying to install the plugin in my store admin, I have also replaced InnoDB with MyISAM in the script installer as detailed above but I get the same error when clicking on install. Is there something I can change in my database using myphpAdmin to fix this?

    PHP Version: 7.1.33 (Zend: 3.1.0)
    Database Engine: MySQL 5.5.5-10.3.27-MariaDB
    Zen Cart 1.5.7c

    I hope this is an easy fix as my search is currently non-functioning (I installed on my live store without testing lol)
    For example, when I search for 'Upholstery' I get a page not found error and the url is changed to index.php?main_page=FILENAME_INSTANT_SEARCH_RESULT&keyword=upholstery


    Click image for larger version. 

Name:	fulltext.jpg 
Views:	253 
Size:	21.1 KB 
ID:	20251

  5. #5
    Join Date
    Jun 2021
    Posts
    42
    Plugin Contributions
    2

    Default Re: Instant Search

    Quote Originally Posted by CunningStunt2 View Post
    Havin a problem installing this, I get "Column 'products_description' cannot be part of FULLTEXT index" when trying to install the plugin in my store admin, I have also replaced InnoDB with MyISAM in the script installer as detailed above but I get the same error when clicking on install. Is there something I can change in my database using myphpAdmin to fix this?

    PHP Version: 7.1.33 (Zend: 3.1.0)
    Database Engine: MySQL 5.5.5-10.3.27-MariaDB
    Zen Cart 1.5.7c

    I hope this is an easy fix as my search is currently non-functioning (I installed on my live store without testing lol)
    For example, when I search for 'Upholstery' I get a page not found error and the url is changed to index.php?main_page=FILENAME_INSTANT_SEARCH_RESULT&keyword=upholstery


    Click image for larger version. 

Name:	fulltext.jpg 
Views:	253 
Size:	21.1 KB 
ID:	20251
    Apart from the index error, your PHP version is too old for this plugin, it requires at least PHP 7.4. So it won't work no matter what.
    With that configuration you should use an older version (v1) of the plugin.

  6. #6
    Join Date
    Jan 2019
    Location
    UK
    Posts
    113
    Plugin Contributions
    0

    Default Re: Instant Search

    Thanks for the info Marcopm, i'll remove what i've uploaded and give the older version a go.

  7. #7
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    190
    Plugin Contributions
    0

    Default Re: Instant Search

    Love this plugin!!! I was hoping that someone could give some guidance as to how to include the products description in the drop down.

    Thanks in advance.

  8. #8
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,691
    Plugin Contributions
    11

    Default Re: Instant Search

    I'm sure there is a way to add that and looking at https://www.cloudways.com/blog/live-...hp-mysql-ajax/ might give some pointers BUT,

    I'm not sure you could successfully present enough space to show enough of the product description to make it worthwhile.

    Even using more... to truncate the presented info, you would still need 100-150 characters to show to even start making sense of what might be in the description. Google truncates its search results at 160 characters.

    Whereever you decide to truncate for the search, you would need to make sure the characters shown are not just filler but contain enough information to "tease" the customer.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

 

 

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