<<

NAME

ProductOpener::APITaxonomy - implementation of APIs to return the list of available attribute groups and preferences

DESCRIPTION

display_preferences_api ( $target_lc )

Only for API V0 to V2

Return a JSON structure with all available preference values for attributes.

This is used by clients that ask for user preferences to personalize filtering and ranking based on product attributes.

Arguments

request object reference $request_ref

language code $target_lc

Sets the desired language for the user facing strings.

preferences_api ( $request_ref )

Only for API V3+

Return a JSON structure with all available preference values for attributes.

This is used by clients that ask for user preferences to personalize filtering and ranking based on product attributes.

Parameters

$request_ref (input)

Reference to the request object.

display_attribute_groups_api ( $request_ref, $target_lc )

Only for API V0 to V2

Return a JSON structure with all available attribute groups and attributes, with strings (names, descriptions etc.) in a specific language, and return them in an array of attribute groups.

This is used in particular for clients of the API to know which preferences they can ask users for, and then use for personalized filtering and ranking.

Attributes with parameters such as unwanted_ingredients are not returned.

Arguments

request object reference $request_ref

language code $target_lc

Returned attributes contain both data and strings intended to be displayed to users. This parameter sets the desired language for the user facing strings.

attribute_groups_api ( $request_ref )

Only for API V3+

Return a JSON structure with all available attribute groups and attributes, with strings (names, descriptions etc.) in a specific language, and return them in an array of attribute groups.

This is used in particular for clients of the API to know which preferences they can ask users for, and then use for personalized filtering and ranking.

If the API version requested is < 3.4, then attributes with parameters such as unwanted_ingredients are not returned.

Parameters

$request_ref (input)

Reference to the request object.

<<