Properties

$widgetId

$widgetId : int

Widget id from cross sell management interface

Type

int

$chunkSize

$chunkSize : int

Number of elements to retrieve

Type

int

$startIndex

$startIndex : int

First product element to retrieve

Type

int

$includeWidgetDetails

$includeWidgetDetails : bool

True to get widget details in crosssell response

Type

bool

$excludeProductIds

$excludeProductIds : array

Array of product ids to exclude from response data

Type

array

Methods

__construct()

__construct( $data)

Constructor

Parameters

$data

getType()

getType() : string

Request type, always 'cs'

Returns

string

setContext()

setContext(\Econda\RecEngine\Context\Context $context) : $this

Context to get recommendations for.

Parameters

\Econda\RecEngine\Context\Context $context

Returns

$this

getWidgetId()

getWidgetId() : int

Get current widget id

Returns

int

setWidgetId()

setWidgetId(int $widgetId) : \Econda\RecEngine\Client\Request

Set widget id as defined in cross sell management interface

Parameters

int $widgetId

Throws

\Econda\RecEngine\Exception\InvalidArgumentException

Returns

\Econda\RecEngine\Client\Request

getStartIndex()

getStartIndex() : \Econda\RecEngine\Client\Request\number

Get first requested element index

Returns

\Econda\RecEngine\Client\Request\number

setStartIndex()

setStartIndex(int $index) : \Econda\RecEngine\Client\Request

Set first element. Used for server side paging

Parameters

int $index

Throws

\Econda\RecEngine\Exception\InvalidArgumentException

Returns

\Econda\RecEngine\Client\Request

getChunkSize()

getChunkSize() : \Econda\RecEngine\Client\Request\number

Get max number of recommendations

Returns

\Econda\RecEngine\Client\Request\number

setChunkSize()

setChunkSize(\Econda\RecEngine\Client\Request\number $chunkSize) : \Econda\RecEngine\Client\Request

Set max number of recommendations to return

Parameters

\Econda\RecEngine\Client\Request\number $chunkSize

Throws

\Econda\RecEngine\Exception\InvalidArgumentException

Returns

\Econda\RecEngine\Client\Request

getIncludeWidgetDetails()

getIncludeWidgetDetails() : boolean

True if we'll include widget details in response

Returns

boolean

setIncludeWidgetDetails()

setIncludeWidgetDetails(boolean $includeWidgetDetails) : \Econda\RecEngine\Client\Request

Set to false to exclude widget details from server response

Parameters

boolean $includeWidgetDetails

Returns

\Econda\RecEngine\Client\Request

setExcludeProductIds()

setExcludeProductIds(array|string $productIds) : $this

Set product ids to exclude from response data

Parameters

array|string $productIds

Returns

$this

getExcludeProductIds()

getExcludeProductIds() : array

Get array of product ids to exclude from response data

Returns

array

initPropertiesFromArray()

initPropertiesFromArray( $data)

Parameters

$data