Instant Search

Views: 59,248

Results 161 to 180 of 262
13 Jan 2023, 9:21 AM
#161
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Instant Search

dw08gm:

I am just wondering whether a somewhat detailed explanation/instruction upon how best to setup or structure the wording of the product description field would be highly beneficial to all and sundry.

As for the search results, don't worry too much. If there is a search word in the product description, the product is included in the results. Simple as that.

However, I'm considering including the product keywords meta tag field as an additional field to search. This way you could add some keywords that are not included in the description but that you still want to associate with the product in the search.
Meta keywords are no longer used by search engines (since quite a long time ago) by the way, so at least we make some use of them :D

13 Jan 2023, 6:32 PM
#162
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: Instant Search

Version 3.0.1 of the plugin is available. It includes a bugfix and the possibility to include the product keywords meta tag in the searchable fields.

14 Jan 2023, 2:36 PM
#163
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Instant Search

This is a great plugin marcopm and thanks for your work on it.

I have downloaded the newest version from Github and installed it into v.1.5.8 and when running it I get this error in the Debug Logs and it does not output results.....

PHP Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in C:\wamp64\www\158\zc_plugins\InstantSearch\v3.0.1\classes\InstantSearch.php on line 31

[14-Jan-2023 06:32:35 America/Los_Angeles] Request URI: /158/ajax.php?act=ajaxInstantSearchDropdown&method=instantSearch, IP address: 127.0.0.1
--> PHP Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in C:\wamp64\www\158\zc_plugins\InstantSearch\v3.0.1\classes\InstantSearch.php on line 31.

Any ideas on what this is referring to???

Thanks for your help,

Jeff

14 Jan 2023, 3:36 PM
#164
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: Instant Search

NWCE:

This is a great plugin marcopm and thanks for your work on it.

I have downloaded the newest version from Github and installed it into v.1.5.8 and when running it I get this error in the Debug Logs and it does not output results.....

PHP Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in C:\wamp64\www\158\zc_plugins\InstantSearch\v3.0.1\classes\InstantSearch.php on line 31

[14-Jan-2023 06:32:35 America/Los_Angeles] Request URI: /158/ajax.php?act=ajaxInstantSearchDropdown&method=instantSearch, IP address: 127.0.0.1
--> PHP Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in C:\wamp64\www\158\zc_plugins\InstantSearch\v3.0.1\classes\InstantSearch.php on line 31.

Any ideas on what this is referring to???

Thanks for your help,

Jeff

What PHP version are you using?
The plugin requires at least PHP 7.4

14 Jan 2023, 4:49 PM
#165
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Instant Search

Perfect suggestion....I upped the PHP to 7.4.9 (was 7.3.21) and it now works perfectly and throws no errors!

Thanks for your help....and again for updating this very useful plugin.

Thanks again,

Jeff

14 Jan 2023, 6:24 PM
#166
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,867
Plugin Contributions:
19

Re: Instant Search

@NWCE
Please note that PHP 7.4 is End Of Life (EOL) and not supported. You should consider going to 8.0 as a minimum if you are running 1.5.8.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

24 Feb 2023, 8:43 AM
#167
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: Instant Search

Version 4.0.0 Beta of the plugin is available on the GitHub repo (https://github.com/marco-pm/zencart_instantsearch/releases):

  • Refactor of the search class to allow the use of different search engines (with automatic fallback to MySQL if the search engine is unavailable)
  • Support for using Typesense as a search engine (with the Typesense add-on)
  • Improved display of categories and brands in the dropdown
  • Search in the product category and brand
  • Complete rewrite of the JavaScript code of dropdown and results page with React and TypeScript
  • Improved dropdown accessibility and keyboard navigation
  • Various bug fixes and improvements

Apologies for yet another major version change after last month's v3 release, I know keeping up with the constant changes is quite frustrating.
I had to make some major code changes to accommodate the Typesense add-on (which allows you to use Typesense as engine for Instant Search instead of MySQL).

There are other major changes as well, especially regarding the results dropdown, hence the "Beta" tag. It would be extremely helpful if any of you could try installing the release and let me know about any bugs :smile:

If everything seems to work fine, I'll remove the "beta" tag and submit it to the plugin sections here as usual.

25 Feb 2023, 6:52 AM
#168
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
429
Plugin Contributions:
0

Re: Instant Search

marcopm:

Version 4.0.0 Beta of the plugin is available on the GitHub repo (https://github.com/marco-pm/zencart_instantsearch/releases):
... If everything seems to work fine, I'll remove the "beta" tag and submit it to the plugin sections here as usual.

Works on zc158 php7.4 to php8.2
I installed v3.0.1 first , ran it then dumped v 4.0.0 over it. V4.0.0 installed correctly. Ran well. It is fast.
It stopped my search box in side_boxes
Uninstalled it
PHP 8.2 Fatal Error: Undefined constant "FILENAME_INSTANT_SEARCH_RESULT" in \includes\classes\observers\auto.instant_search_observer.php:37

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

25 Feb 2023, 5:52 PM
#169
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: Instant Search

OldNGrey:

Works on zc158 php7.4 to php8.2
I installed v3.0.1 first , ran it then dumped v 4.0.0 over it. V4.0.0 installed correctly. Ran well. It is fast.
It stopped my search box in side_boxes
Uninstalled it
PHP 8.2 Fatal Error: Undefined constant "FILENAME_INSTANT_SEARCH_RESULT" in \includes\classes\observers\auto.instant_search_observer.php:37

I'm not able to reproduce the issue.
What template are you using?
Can you check that the file zc_plugins/InstantSearch/v4.0.0/catalog/includes/extra_datafiles/instant_search_filenames.php is present (it should be, but I can't think of anything else)?

25 Feb 2023, 9:50 PM
#170
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
429
Plugin Contributions:
0

Re: Instant Search

marcopm:

I'm not able to reproduce the issue.
What template are you using?
Can you check that the file zc_plugins/InstantSearch/v4.0.0/catalog/includes/extra_datafiles/instant_search_filenames.php is present (it should be, but I can't think of anything else)?

My apologies. The error occurred after disabling the Instant Search, because I switched templates and the template files were in my bootstrap clone folders but not in the source bootstrap folders.

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

4 Mar 2023, 7:08 PM
#171
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: Instant Search

I'm getting this error

"The used table type doesn't support FULLTEXT indexes"

I'm using Zen Cart 1.5.7C with Responsive_Classic template

I had an older version working and wanted to update to this new version.

Thanks!

4 Mar 2023, 8:39 PM
#172
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: Instant Search

brian70809:

I'm getting this error

"The used table type doesn't support FULLTEXT indexes"

I'm using Zen Cart 1.5.7C with Responsive_Classic template

I had an older version working and wanted to update to this new version.

Thanks!

Can you check if you're using MySQL engine version 5.5 (from the Zen Cart Admin, Tools > Server/version info, look for "Database Engine")?

If that's the case, I would first recommend to upgrade MySQL to a more recent version, as 5.5 is EOL since many years. If that's not possible, replace the word "InnoDB" with "MyISAM" in zencart_instantsearch/zc_plugins/InstantSearch/v<x.y.z>/Installer/ScriptedInstaller.php and try installing again.

3 Apr 2023, 3:28 PM
#173
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

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:

[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.
3 Apr 2023, 5:13 PM
#174
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: Instant Search

lat9:

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:

[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_instantsearch/commit/e713071caa03d2311cd89d0fc73a4f49a97f7072>

In short, replace $img !== '' with !empty($img)
3 Apr 2023, 5:42 PM
#175
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Instant Search

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

4 Apr 2023, 12:42 PM
#176
cunningstunt2 avatar

cunningstunt2

Zen Follower

Join Date:
Jan 2019
Location:
UK
Posts:
113
Plugin Contributions:
0

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

Attachment 20251

4 Apr 2023, 2:13 PM
#177
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: Instant Search

CunningStunt2:

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

Attachment 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.

4 Apr 2023, 2:19 PM
#178
cunningstunt2 avatar

cunningstunt2

Zen Follower

Join Date:
Jan 2019
Location:
UK
Posts:
113
Plugin Contributions:
0

Re: Instant Search

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

6 Jun 2023, 4:38 PM
#179
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

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.

6 Jun 2023, 5:21 PM
#180
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,867
Plugin Contributions:
19

Re: Instant Search

I'm sure there is a way to add that and looking at https://www.cloudways.com/blog/live-search-php-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.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com