Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Plugin Contributions

    Idea or Suggestion Soundex Search [Support Thread]

    This is the official support thread for the Soundex Search addon, found at and a GitHub repository is linked from there.

    The addon adds SOUNDEX ( matching to the normal customer facing Search function, normally available from the header of the site. This means that if you have a product called "Wonderfudge bracelets" and a customer types "wanderfudge" into the search bar, they will still find your product.

    One big catch of this addon is that it relies on Stored Procedures and Triggers to maintain its lookup data, so if your database user does not have privileges to create these entities, for example you're on a restrictive shared hosting environment, then the install will fail. It tries to test these privileges before taking any actions and should warn you with sensible error messages.

    v1.0.1 released today to fix minor issues with procedure names. Developed against Zen Cart 1.5.8 and later, though the readme describes how it can be made to work with earlier Zen Cart versions. Note: I haven't actually tested it much on earlier versions so your mileage may vary! Written using PHP 8.x and MariaDB 10.5 but should be compatible with earlier versions. If anyone can raise a useful bug report here against earlier versions, I can look at fixing compatibility.

  2. #2
    Join Date
    Feb 2009
    Plugin Contributions

    Idea or Suggestion Re: Soundex Search [Support Thread]

    tl;dr: with the new stored procedures and triggers introduced to your database by this addon, you will need to ensure backups are made with the mysqldump "-R" option (or equivalent in your backup system to include procedures, functions and triggers), and you may need to massage the dump if you need to import it into a database using a different username. If you are backing up and restoring to the same database (e.g. a backup of your live shop) you should still ensure you include stored procedures and functions in your backup, an option that may not be enabled by default in your system.

    When importing a backup created via something like mysqldump you may see this error message:

    ERROR 1227 (42000) at line 96: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
    The problem is probably "DEFINER" lines in the dumped SQL related to the triggers from this addon file which cause errors during import. Exactly how you can get around this depend on exactly how you are creating your export file (what backup tool or command you're using), and the environment you are importing it in (what command line tools you have available).

    You should ensure you use the "-R" switch (or equivalent) when backing up your database:

    $ # On one machine (probably live)
    $ mysqldump -R my_zen_database products products_description > backup.sql
    $ # On another machine with different username
    $ mysql my_other_zen_database < backup.sql
    I found the backup will contain the username of the original `mysqldump` command, e.g.:

    /*!50003 CREATE*/ /*!50017 DEFINER=`live_username`@`localhost`*/ /*!50003 TRIGGER soundex_prod_desc_update
    When this SQL is executed against your target database it will probably fail because the user `live_username` does not exist in that database, and you get the above error message. mysqldump does not appear to have any options that can make the dumped SQL file friendly. From searching online, there is a mysqlpump command shipped with MySQL that has a `--skip-definer` option but I'm using MariaDB which does not appear to have this tool (see

    The fix is to either change the DEFINER line to use your local username, or remove the DEFINER clause entirely.

    To change the clause: s/DEFINER=`live_username`/DEFINER=`local_username`/
    To remove the clause: s/\/\*!\d* DEFINER=[^*]*\*\///

    For stored procedures, the dump will contain the DEFINER username for stored procedures:

    CREATE DEFINER=`live_username`@`localhost` PROCEDURE `soundex_search_init_for_value`(
    Here we again need to either change the username, or remove the DEFINER line entirely.

    To change the clause (same as above): s/DEFINER=`live_username`/DEFINER=`local_username`/
    To remove the clause: s/CREATE DEFINER=[^ ]*/CREATE /

  3. #3
    Join Date
    Nov 2005
    los angeles
    Plugin Contributions

    Default Re: Soundex Search [Support Thread]

    good info.

    thanks for posting.
    author of square Webpay. called the savior by the chief bottle washer...
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    available for hire.

  4. #4
    Join Date
    Feb 2009
    Plugin Contributions

    Default Re: Soundex Search [Support Thread]

    v1.0.2 released at
    Notes: Fix query building so that only specific table and column combinations are matched. Previously we were matching broadly on the word value without specifying which table and column it was supposed to match against. Only a single file has changed, you can copy includes/classes/observers/auto.soundex_search_observer.php to pick up the fix.

    For some reason the Zen Cart plugin page isn't showing any version beyond v1.0.0, but I have submitted them there too. Maybe they are pending moderation.



Similar Threads

  1. v158 Google Product Search Feeder II [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 32
    Last Post: 1 Mar 2024, 03:04 AM
  2. Typesense plugin (Instant Search add-on) Support Thread
    By marcopm in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 2 Jul 2023, 04:54 PM
  3. v154 Search: Prioritize Matching Names [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 9 Nov 2022, 10:45 PM
  4. v151 Codetrio Sphinx Search Version 1.0 Support Thread
    By imranulh in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 16 Jul 2014, 01:24 AM
  5. Search Helper Support Thread
    By swguy in forum All Other Contributions/Addons
    Replies: 18
    Last Post: 9 Nov 2011, 11:14 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Zen-Cart, Internet Selling Services, Klamath Falls, OR