$recommendationTime
$recommendationTime : integer
The time of the recommendation (seconds in unixtime format), the time when it will be shown to the end user.
Use a value as returned by the standard time() PHP function.
Contains information for a recommendation request.
$nameValues : array<mixed,\GravityNameValue>
The NameValues for the context.
NameValues can describe the parameters for the actual scenario, like current item id, filtering by category etc. Item-to-item recommendation is possible by a specific scenario which parses a NameValue describing the current item, or multiple NameValues if there are multiple actual items. The list of allowed names depends on the actual scenario.
The scenario can also specify that the result is not a list of items, but a list of values of item NameValues.
Name | Description |
---|---|
CurrentItemId | The identifier of the actual item, if the current page is an item page. |
ItemOnPage | Identifier of item displayed elsewhere on the page. They will be excluded from recommendation. This namevalue can be used multiple times to provide a list of items. |
CartItemId | Identifier of item in the current shopping cart. This can provide additional information to improve the quality of recommendation. This namevalue must be used as many times as many items the shopping cart contains. |
CartItemQuantity | The quantity of items in the current shopping cart, in the same order as CartItemId namevalues. |
Filter.* | If specified, only items having the specified name and value as metadata will be in the result. For example, the namevalue with name='Filter'.'CategoryId' and value='A' means that only items belonging to category 'A' will be in the result. |
$resultNameValues : array<mixed,\GravityNameValue>
If not null, specifies which NameValues of the recommended items should be included in the result.
If null, the returned NameValues are determined by the actual scenario.