ResultFieldTemplate

Deprecated!

since 5.0.0 will be deleted in 6.0.0

Namespace

IO\Services\ItemSearch\Helper

Constants
Type Name Value Description

string

TEMPLATE_LIST_ITEM

'IO.ResultFields.ListItem'

string

TEMPLATE_SINGLE_ITEM

'IO.ResultFields.SingleItem'

string

TEMPLATE_BASKET_ITEM

'IO.ResultFields.BasketItem'

string

TEMPLATE_AUTOCOMPLETE_ITEM_LIST

'IO.ResultFields.AutoCompleteListItem'

string

TEMPLATE_CATEGORY_TREE

'IO.ResultFields.CategoryTree'

string

TEMPLATE_VARIATION_ATTRIBUTE_MAP

'IO.ResultFields.VariationAttributeMap'

Properties
Type Name Description

``

$templates

``

$requiredFields

Methods
public static get($template):string
Deprecated!

since 5.0.0 will be deleted in 6.0.0

Get the path to result fields file from template/ theme

Parameters

Type

Name

Description

string

$template

Event to be emitted to templates/ themes

public static load($template):array
Deprecated!

since 5.0.0 will be deleted in 6.0.0

Parameters

Type

Name

Description

string

$template

public setTemplate($event, $template)
Deprecated!

since 5.0.0 will be deleted in 6.0.0

Set the path of a template to read result fields from.

Parameters

Type

Name

Description

string

$event

The event to set the template for.

string

$template

Path to the template to read result fields from.

public setTemplates($templateMap)
Deprecated!

since 5.0.0 will be deleted in 6.0.0

Set multiple templates to read result fields from.

Parameters

Type

Name

Description

Helper

$templateMap

public requireFields($event, $field = [])
Deprecated!

since 5.0.0 will be deleted in 6.0.0

Add required fields to variation search requests.

Parameters

Type

Name

Description

string | array

$event

A single template event to set required fields for or a map between template events and list of required fields

string | array

$field

If first parameter describes a single template event this parameter may contain a single result field or a list of field to require.