Skip to content
Menu

Magento 2

Install the SeekGist module on Magento 2.

The SeekGist module works with Magento Open Source and Adobe Commerce 2.4.x with OpenSearch or Elasticsearch, on PHP 8.1+ with cURL. It was tested on Magento Open Source 2.4.9 (PHP 8.3, MySQL 8.4, OpenSearch 3.9, Luma theme).

1. Get your keys

Create your store in the SeekGist dashboard, then open Settings > API keys: a public key (sg_pub_..., safe in a web page) and a secret key (sg_sec_..., server only).

2. Install the module

Either with Composer, from the package file seekgist-module-search-1.0.0.zip:

mkdir -p artifacts && cp seekgist-module-search-1.0.0.zip artifacts/
composer config repositories.seekgist artifact ./artifacts
composer require seekgist/module-search:1.0.0

or by copying the files: unzip the package into app/code/SeekGist/Search/.

Then, in the Magento folder:

bin/magento module:enable SeekGist_Search
bin/magento setup:upgrade
bin/magento setup:di:compile               # production mode only
bin/magento setup:static-content:deploy    # production mode only
bin/magento cache:flush

The module adds four small tables (seekgist_*) and a cron job (seekgist_cron, every 5 minutes). Magento's own cron must run (it does on every normal Magento store).

3. Settings

Open Stores > Configuration > Catalog > SeekGist Search.

GroupSettingWhat to put
ConnectionUse SeekGistYes. No = Magento's own search, at once.
API addresshttps://api.seekgist.com (keep the default)
Public key / Secret keyYour keys. The secret key is stored encrypted.
FeaturesSearch resultsYes: SeekGist orders the search results page; your theme shows the products.
Suggest boxYes: suggestions and products while the shopper types (Magento's own autocomplete is hidden).
Click and sales trackingYes. No personal data is sent.
Product syncYes.
Only in-stock productsAlso on when "Display Out of Stock Products" is No.
StorefrontSearch box selectorEmpty works for Luma and most themes (#search).
Catalog languageEmpty = the store view's locale.
TranslationsWrite back translations forFor example ar, if you have an Arabic store view.

Save, then in Status and actions click Test connection ("Public key: OK", "Secret key: OK"; the store appears in the SeekGist dashboard), then Sync all products now.

Settings can differ per website and store view (for example: search on for the Arabic store view only). Keys and sync are set once.

How it works

  • The search page stays catalogsearch/result/?q=.... SeekGist chooses and orders the products of the page; Magento loads and shows its own product list, so prices, special prices, tax and customer-group prices stay right.
  • If SeekGist is slow (over 300 ms) or answers with any error, Magento's own search answers that search at once, and that page is not kept in the full page cache. After 5 errors in 60 seconds, SeekGist is skipped for 30 seconds. See Store fallback.
  • The module sends its request to SeekGist first, and Magento's own search runs while SeekGist answers. So when SeekGist is slow, the page waits at most 300 ms more.
  • With a layered-navigation filter (category, price, attribute) or a sort other than relevance or price, Magento's own search serves.
  • Add-to-cart and orders are counted on your server and sent later by the cron, so the cart and checkout never wait for SeekGist.
  • Products: enabled products visible in the catalog or search are sent; configurable products are sent once (lowest child price). Each store view with another language adds its names and descriptions.
  • Translations: approved texts are written as the store-view value (product name, description, category name) of every store view in that language. A text a person typed is never replaced.

Commands

bin/magento seekgist:test                 # Test connection
bin/magento seekgist:cron --task=full     # all | delta | full | outbox | writeback
bin/magento seekgist:products --ids=12,13 # products exactly as SeekGist receives them

Remove

bin/magento module:disable SeekGist_Search && bin/magento setup:upgrade

Then delete app/code/SeekGist/Search (or run composer remove seekgist/module-search). Translations it wrote stay (they are your store's content now).

Problems

You seeDo this
"Public key: not accepted"Copy the key again; check the API address.
Search looks like beforeIs "Use SeekGist" Yes for this store view? The response header X-SeekGist-Search tells why (ok, off, native_filter, fallback_timeout and so on).
Nothing is syncedIs Magento's cron running? Run bin/magento seekgist:cron --task=full and read the output.
Content Security Policy reportsThe module allows api.seekgist.com for connect-src. With your own API address, add it to your CSP whitelist.