Instant Search

Views: 59,248

Results 241 to 260 of 262
10 Feb 2025, 4:00 AM
#241
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Instant Search

unfortunately i can not/will not debug his code.

marco pm is the one that created this plugin. his code looks to handle this situation although i have not tested.

torvista, on the other hand, while well intentioned, is not a coder. self described as such. so i’m not real sure what he is doing. and i’m reluctant to look.

the error seems pretty obvious to me. the installer is trying to create an index that already exists. and it looks like the file i referenced above handles that situation although i have not tested.

so again i would compare against that version. torvista has forked the original authors repo. and again im not real sure what changes exist.

good luck.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

11 Feb 2025, 4:21 PM
#242
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Thanks again for your reply carlwhat!

I have tried marcopm's plugin from Github as you had suggested...but this code which is intended to recognize and deal with old versions does not allow you to install the plugin.

When all files are uploaded and I go to Admin->Modules->Plugin Mgr, I see the plugin and press the Install key, only to get a white screen and the plugin gets tripped up at DoInstall.

The Debug Error is specifically referencing this code about dealing with past versions.

PHP Fatal error: Declaration of ScriptedInstaller::doUpgrade(string $oldVersion = ''): bool must be compatible with Zencart\PluginSupport\ScriptedInstaller::doUpgrade($oldVersion): ?bool in /home/mysite/public_html/new210/zc_plugins/InstantSearch/v4.0.3/Installer/ScriptedInstaller.php on line 27

When deleting this entire code from line 27 down, and then Installing from Admin-> Plugin Mgr the plugin installs and runs perfectly when tested....no Debug Errors.

Unfortunately this does not fix my error in my original post regarding then running the Database Converter Plugin...it breaks the plugin where it no longer works and when uninstalling and reinstalling the plugin, it will no longer install and I receive the error in my Admin Panel when trying to install....

Duplicate key name 'idx_products_name'
Duplicate key name 'idx_products_description'

When I Search my database....these do not come up in any table....so not sure why this error is occurring.

Any thoughts....as marcopm has not responded in this thread.

I understand that he is likely busy!

12 Feb 2025, 2:19 AM
#243
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Instant Search

NWCE:

Thanks again for your reply carlwhat!

I have tried marcopm's plugin from Github as you had suggested...but this code which is intended to recognize and deal with old versions does not allow you to install the plugin.

When all files are uploaded and I go to Admin->Modules->Plugin Mgr, I see the plugin and press the Install key, only to get a white screen and the plugin gets tripped up at DoInstall.

The Debug Error is specifically referencing this code about dealing with past versions.

PHP Fatal error: Declaration of ScriptedInstaller::doUpgrade(string $oldVersion = ''): bool must be compatible with Zencart\PluginSupport\ScriptedInstaller::doUpgrade($oldVersion): ?bool in /home/mysite/public_html/new210/zc_plugins/InstantSearch/v4.0.3/Installer/ScriptedInstaller.php on line 27

this is a very different error than what you were getting before. one has nothing to do with the other.

it looks like you need to make the following changes:

on lines 27, 65 and 124, you will need to change as fllows:

public function doUpgrade(string $oldVersion = ''): ?bool

public function doInstall(string $oldVersion = ''): ?bool

public function doUninstall(string $oldVersion = ''): ?bool

all you are doing is adding a question mark to before the term bool. that's all you are doing.

NWCE:

When deleting this entire code from line 27 down, and then Installing from Admin-> Plugin Mgr the plugin installs and runs perfectly when tested....no Debug Errors.

where did you ever get that idea to delete all of that code??

of course if you delete all of the code the installer will run perfectly. tell me to do nothing... i'm real good at that.

NWCE:

Duplicate key name 'idx_products_name'
Duplicate key name 'idx_products_description'

When I Search my database....these do not come up in any table....so not sure why this error is occurring.

I understand that he is likely busy!

why someone responds or does not respond, i try not to get too involved in it. i'm also quite busy...

that said, these are keys. they are not in a database table. they are a part of the database table. they are indexes onto the database table.

if the changes i made above do not work, you can try running the following mysql commands.

drop index idx_products_name on products_description;
drop index idx_products_description on products_description;

these can be done on the mysql command line, using a tool like phpmyadmin or my least favorite, install sql patches on the backend of your zc admin page under tools menu. the above mysql statements will need to use a prefix for the products_description table name. if you do not know what i am talking about... well perhaps someone else can help you out.

after you drop the indexes, you can then run the installer again. but it definitely looks like you will need those 3 question marks i referenced above.

let us know how it goes.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

12 Feb 2025, 11:25 AM
#244
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Instant Search

This plugin needs a reworking, as indicated here:

https://github.com/marco-pm/zencart_instantsearch/issues

Meanwhile I've been going round in circles to minimise the changes necessary for it to install and function.

This fork works on a new install of Zen Cart:

https://github.com/torvista/zencart_instantsearch/commits/torvista_fixes/

Changes are in the commit history.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

12 Feb 2025, 12:55 PM
#245
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Thanks carlwhat for your support and help with the error I am getting with this.

I made these 3 code changes to ScriptedInstaller.php and had Uninstalled the plugin.

When I try to Install the plugin with this new ScriptedInstaller.php file I get a white screen with the following Debug Log:

PHP Fatal error: Declaration of ScriptedInstaller::doUpgrade(string $oldVersion = ''): ?bool must be compatible with Zencart\PluginSupport\ScriptedInstaller::doUpgrade($oldVersion): ?bool in /home/mysite/public_html/new210/zc_plugins/InstantSearch/v4.0.3/Installer/ScriptedInstaller.php on line 27

Thoughts on this error??

Thanks again!

12 Feb 2025, 12:57 PM
#246
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

torvista:

This plugin needs a reworking, as indicated here:

https://github.com/marco-pm/zencart_instantsearch/issues

Meanwhile I've been going round in circles to minimise the changes necessary for it to install and function.

This fork works on a new install of Zen Cart:

https://github.com/torvista/zencart_instantsearch/commits/torvista_fixes/

Changes are in the commit history.

Thanks for your help with this plugin and your efforts to update the plugin to get it working in this latest Zen Cart version!

13 Feb 2025, 8:18 AM
#247
marcopm avatar

marcopm

New Zenner

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

Re: Instant Search

Sorry for not replying to this thread in a while, unfortunately I've been quite busy these past few months. Thanks torvista and carlwhat for your help!
A plugin update has been on my to-do list for a while now, to make it compatible with the latest ZC and PHP versions, and with bugfixes and improvements.
I'll try to do it within the next few weeks, but it may take a while longer unfortunately.

13 Feb 2025, 12:12 PM
#248
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Thanks for your reply marcopm....and for your offer to update the plugin over time!

I will watch for a newer version!

14 May 2026, 12:52 PM
#249
daxtheman avatar

daxtheman

New Zenner

Join Date:
Jun 2023
Location:
UK
Posts:
21
Plugin Contributions:
0

Re: Instant Search

ZC 2.1 PHP 8.3

Instant Search works in 2.1 and I am very happy with result with one exception. I have tailored the configuration field to prioritise category but have many duplicate categories - so Instant Search reports each instance as, indeed, it should. However, this does look a little clumsy. Is there any way to avoid duplicated categories appearing in the results? Can't see a toggle in admin that would do it, so it may just not be possible.

Thanks for any help that could be offered.

25 Jun 2026, 1:16 PM
#250
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

I have been running this plugin on my Zen Cart v.2.1 site for about a year now....and wanted to make some changes to how it Searches via the Admin Panel (Product Fields To Search And Order).

When I try to change the order of the product fields to Search (I've used Cut & Paste to retain exact spelling and the comma without spaces) I get a 500 Internal Server Error with the following Debug Log:

Request URI: /shop/admin/index.php?cmd=configuration&gID=67&cID=1377&action=save, IP address: 129.222.96.70
--> PHP Fatal error: Uncaught TypeError: filter_var(): Option must be a valid callback in /home/XXXX/public_html/shop/admin/includes/functions/configuration_checks.php:56
Stack trace:
#0 /home/XXXX/public_html/shop/admin/includes/functions/configuration_checks.php(56): filter_var()
#1 /home/XXXX/public_html/shop/admin/configuration.php(22): zen_validate_configuration_entry()
#2 /home/XXXX/public_html/shop/admin/index.php(16): require('...')
#3 {main}
thrown in /home/XXXX/public_html/shop/admin/includes/functions/configuration_checks.php on line 56.

The change I am looking to make in the order is to move is to move the 'model-exact' further down the line, so that 'name-description' is the first.

Any ideas why I am unable to change the order? Is it a folders permissions issue??

Thanks for any ideas...

Jeff

25 Jun 2026, 4:12 PM
#251
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Instant Search

NWCE:

I have been running this plugin on my Zen Cart v.2.1 site for about a year now....and wanted to make some changes to how it Searches via the Admin Panel (Product Fields To Search And Order).

When I try to change the order of the product fields to Search (I've used Cut & Paste to retain exact spelling and the comma without spaces) I get a 500 Internal Server Error with the following Debug Log:

Request URI: /shop/admin/index.php?cmd=configuration&gID=67&cID=1377&action=save, IP address: 129.222.96.70
--> PHP Fatal error: Uncaught TypeError: filter_var(): Option must be a valid callback in /home/XXXX/public_html/shop/admin/includes/functions/configuration_checks.php:56
Stack trace:
#0 /home/XXXX/public_html/shop/admin/includes/functions/configuration_checks.php(56): filter_var()
#1 /home/XXXX/public_html/shop/admin/configuration.php(22): zen_validate_configuration_entry()
#2 /home/XXXX/public_html/shop/admin/index.php(16): require('...')
#3 {main}
thrown in /home/XXXX/public_html/shop/admin/includes/functions/configuration_checks.php on line 56.

The change I am looking to make in the order is to move is to move the 'model-exact' further down the line, so that 'name-description' is the first.

Any ideas why I am unable to change the order? Is it a folders permissions issue??

Thanks for any ideas...

Jeff

this is some sort of problem with the load order. it is NOT a folders permission issue.

this issue has already been identified here:

https://github.com/marco-pm/zencart_instantsearch/issues/45

perhaps @marcopm can shed some light.

if all you are looking to do is change the sort order, i would make that change directly to the db using phpMyAdmin or some other mysql tool.

but remember that old shakesperean saying:

"to err is human... but to really mess things up, you need a computer.... and to mess things up royally, you need sql...."

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

25 Jun 2026, 5:51 PM
#252
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Thanks for your reply carlwhat and the link to the Github thread on it.

After reading it and Torvista trying time and time again to fix this issue....it seems like he was unable to decipher and recode this to work properly.

He did mention lat9's Bootstrap version of Search. Is there a plugin for this or is it only part of the Bootstrap Template? Would there be a away to implement it??

Thanks again for your help,

Jeff

25 Jun 2026, 7:40 PM
#253
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Instant Search

NWCE:

Thanks for your reply carlwhat and the link to the Github thread on it.

After reading it and Torvista trying time and time again to fix this issue....it seems like he was unable to decipher and recode this to work properly.

He did mention lat9's Bootstrap version of Search. Is there a plugin for this or is it only part of the Bootstrap Template? Would there be a away to implement it??

Thanks again for your help,

Jeff

jeff,
torvista is good at finding problems.

the idea that you want to change your search order, and because you can not get the configuration to work, and you now want to take a sledge hammer and implement a whole new search plugin, well i am not a fan.

in looking at the code, and testing it, i have found the following change to work:

find this file:

zc_plugins/InstantSearch/v4.0.3/admin/includes/languages/english/extra_definitions/lang.instant_search.php

add the following lines above the define:

// from:

$define = [

// to:

$tempDir = dirname(__FILE__, 6);

if (file_exists($tempDir . '/classes/admin/InstantSearchConfigurationValidation.php') && !class_exists('InstantSearchConfigurationValidation')) {
    require_once $tempDir . '/classes/admin/InstantSearchConfigurationValidation.php';
}

$define = [

i have found in testing this to work.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

26 Jun 2026, 12:58 PM
#254
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Thanks very much carlwhat for your help and suggestion on what to do with my Search going forward.

I really appreciate your work on this and will implement it!

Thanks again,

Jeff

24 Aug 2026, 10:36 PM
#255
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Thanks again for your help with this carlwhat!

Due to a family situation I was unable to implement your changes since our last posts, but had some time today. I unfortunately received a Internal Server Error 500 when accessing my Admin panel after uploading this update file with the new code in it.

I had the following Error Log entry:

24-Aug-2026 16:28:19 America/Regina] PHP Parse error: syntax error, unexpected token ";", expecting "]" in zc_plugins/InstantSearch/v4.0.3/admin/includes/languages/english/extra_definitions/lang.instant_search.php on line 16

[24-Aug-2026 16:28:19 America/Regina] Request URI: admin/login.php, IP address: 129.222.96.87
--> PHP Parse error: syntax error, unexpected token ";", expecting "]" in zc_plugins/InstantSearch/v4.0.3/admin/includes/languages/english/extra_definitions/lang.instant_search.php on line 16.

[24-Aug-2026 16:28:19 America/Regina] Request URI:admin/login.php, IP address: 129.222.96.87
--> PHP Parse error: syntax error, unexpected token ";", expecting "]" in zc_plugins/InstantSearch/v4.0.3/admin/includes/languages/english/extra_definitions/lang.instant_search.php on line 16.

The code on my line 16 is: $tempDir = dirname(FILE, 6);

Any ideas on this error??

Thanks again for your help!

Jeff

24 Aug 2026, 11:30 PM
#256
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Instant Search

post the full contents of the file.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

25 Aug 2026, 2:30 PM
#257
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Instant Search

Note that the original repo of marco-pm has vanished (from public view at least).

I thought I'd quickly update my fork for the benefit of current and non-Bootstrap users but have issues with the current ZC 2.2 which are proving not so easy nor quick (for me) to solve

Since I have this working in my ZC3 site, I cannot really devote more time to this version, so help would be appreciated:

https://github.com/torvista/zencart_instantsearch

thanks

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

25 Aug 2026, 2:32 PM
#258
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Sure... here is what my updated file looks like....

<?php
/**

// from:

$define = [

// to:

$tempDir = dirname(FILE, 6);

if (file_exists($tempDir . '/classes/admin/InstantSearchConfigurationValidation.php') && !class_exists('InstantSearchConfigurationValidation')) {
require_once $tempDir . '/classes/admin/InstantSearchConfigurationValidation.php';
}

$define = [

$define = [
'BOX_CONFIGURATION_INSTANT_SEARCH_OPTIONS' => 'Instant Search',
'TEXT_INSTANT_SEARCH_CONFIGURATION_INT_VALIDATE' => 'Value must be an integer.',
'TEXT_INSTANT_SEARCH_CONFIGURATION_FIELDS_LIST_VALIDATE' => 'The fields list must contain only the allowed values, separated by comma (without spaces or other characters).',
'TEXT_INSTANT_SEARCH_CONFIGURATION_MAX_RESULTS_PAGE_VALIDATE' => 'The value must be an integer and not higher than 250.',
'TEXT_INSTANT_SEARCH_CONFIGURATION_IMG_SIZE_VALIDATE' => 'The value must be an integer (it may be followed by an exclamation mark).',
];

return $define;

Thanks again for your help!

25 Aug 2026, 3:05 PM
#259
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Instant Search

try making it look like this. do not remove the underscores around the word FILE.

<?php
    /**
     * @package Instant Search Plugin for Zen Cart
     * @author  marco-pm
     * @version 4.0.3
     * @see     https://github.com/marco-pm/zencart_instantsearch
     * @license GNU Public License V2.0
     */

    $tempDir = dirname(__FILE__, 6);

    if (file_exists($tempDir . '/classes/admin/InstantSearchConfigurationValidation.php') && !class_exists('InstantSearchConfigurationValidation')) {
        require_once $tempDir . '/classes/admin/InstantSearchConfigurationValidation.php';
    }

    $define = [
        'BOX_CONFIGURATION_INSTANT_SEARCH_OPTIONS' => 'Instant Search',
        'TEXT_INSTANT_SEARCH_CONFIGURATION_INT_VALIDATE' => 'Value must be an integer.',
        'TEXT_INSTANT_SEARCH_CONFIGURATION_FIELDS_LIST_VALIDATE' => 'The fields list must contain only the allowed values, separated by comma (without spaces or other characters).',
        'TEXT_INSTANT_SEARCH_CONFIGURATION_MAX_RESULTS_PAGE_VALIDATE' => 'The value must be an integer and not higher than 250.',
        'TEXT_INSTANT_SEARCH_CONFIGURATION_IMG_SIZE_VALIDATE' => 'The value must be an integer (it may be followed by an exclamation mark).',
    ];

    return $define;

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

25 Aug 2026, 3:54 PM
#260
nwce avatar

nwce

Zen Follower

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

Re: Instant Search

Will do....I will update once I've had the chance to implement it!

Thanks!