Important

You are browsing upcoming documentation for version 6.1 of OroCommerce, scheduled for release in 2025. Read the documentation for version 6.0 (the latest LTS version) to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

SearchApiAccessor 

SearchApiAccessorApiAccessor. Provides access to the search API for autocomplete. This class is by design to be initiated from the server configuration.

Extends: ApiAccessor

Param

Type

Description

options

Object

Options container Also check the options for ApiAccessor

options.search_handler_name

string

Name of the search handler to use

options.label_field_name

string

Name of the property that will be used as a label

options.value_field_name

string

Optional. Name of the property that will be used as an identifier. By default = ‘id’

searchApiAccessor.prepareUrlParameters() 

Kind: instance method of SearchApiAccessor

searchApiAccessor.formatResult(response) ⇒ Object 

Formats response before it is sent out from this api accessor. Converts it to form

{
    results: [{id: '<value>', label: '<label>'}, ...],
    more: '<more>'
}

Kind: instance method of SearchApiAccessor

Param

Type

response

Object