Download the PHP package bitbull/magento-2-tooso-search without Composer
On this page you can find all versions of the php package bitbull/magento-2-tooso-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bitbull/magento-2-tooso-search
More information about bitbull/magento-2-tooso-search
Files in bitbull/magento-2-tooso-search
Package magento-2-tooso-search
Short Description Tooso integration module for Magento 2
License
Informations about the package magento-2-tooso-search
Tooso Search for Magento 2
Tooso is a cloud-based, multi-language search tool for e-commerce.
This extension replaces the default search of Magento with a typo-tolerant, fast & relevant search experience backed by Tooso.
Description
This extension replaces the default Magento search engine with one based on Tooso API. It provide the following features:
- Fulltext search for catalog products (currently advanced search is not supported)
- Scheduled indexing of catalog products (under development)
- Automatic typo correction (under development)
- Search keywords suggest (under development)
Requirements
- PHP > 7.0
- Composer
- Magento >= 2.2.6
Installation Instructions
Latest version
Install latest version using composer:
Specific version
Install a specific version using composer:
Development version
Set "minimum-stability" to "dev" and switch off the "prefer-stable" config:
Install latest development version using composer:
Module Configuration
Request your API KEY
Send an email to [email protected] to request your APIKEY
Set your API KEY:
- Under API Configuration
- Insert your API key into API key field
- Insert http://v{apiVersionWithNoDot}.api.tooso.ai into API base url field. The current supported version is 1, so the placeholder {apiVersionWithNoDot} should be replaced by 1.
- Send report: YES to send a report to Tooso when an API error occourred
- Debug mode: Yes to enable more verbose logging for debug purpose
- Save configuration
Programmatically use Tooso service
If you would like to call Tooso service that currently are not supported with the plugin we suggest this configuration.
Include in your class a dependency from Bitbull\Tooso\Api\Service\ClientInterface
and let DI system do the rest:
build the client instance using a Tooso\SDK\ClientBuilder
instance
this allow you to create a Tooso\SDK\Client
instance to made any HTTP call to Tooso API with the pre-configured required parameters:
access response data from the object of type Tooso\SDK\Response
returned by doRequest
method:
Required theme changes
Product click after search tracking
In order to make product click after search tracking work the frontend script need to find
an attribute data-product-sku
on the a
tag with the product's link valorized with the product SKU.
To do this edit your theme file view/frontend/templates/product/list.phtml
, inside the product list cycle, in the following way:
If you are using an AJAX pagination approach (for example an infinite scrolling loading) you also have to add an attribute data-search-id
on the a
tag with the product's link.
In order to to this edit your theme file view/frontend/templates/product/list.phtml
to load the Tooso Search ID value from registry key tooso_search_response
(available from \Bitbull\Tooso\Model\Service\Search::SEARCH_RESULT_REGISTRY_KEY
class constant),
in this way:
Obviously, this is just an example, is better to inject Magento\Framework\Registry
dependency in your product's list controller using the DI approach.
Suggestion frontend
This module can provide a suggestion on the search input, when you enable this feature you have to remove the default Magento suggestions system.
In order to do this remove the Magento suggestion initialization from your template or override the default template view/frontend/templates/form.mini.phtml
.
Remove this initialization attribute from the search input:
and remove the suggestions container from the template:
All versions of magento-2-tooso-search with dependencies
php Version ~7.0.0|~7.1.0|~7.2.0|~7.3.0
magento/framework Version 101.0.*|102.0.*
magento/module-catalog-search Version ^100.2.4|101.0.*
bitbull/tooso-sdk Version 1.3.*