ePages 7.26.0 - DE_EPAGES/Product/API/ProductVariationService.pm

Package DE_EPAGES::Product::API::ProductVariationService

Service to extract information about variation attributes and sub products from a master product.

Functions

getSubProducts
getVariationAttributes
getVariationsForSubproduct
new

getSubProducts

Returns all variation products from a master product

Syntax
getSubProducts( $IncludeInvisible );
Input
$IncludeInvisible (boolean)
include invisible sub products in case of true
Return
(array_ref)
Array of variation products

getVariationAttributes

Returns details about all variations attributes and their possible values for the master product.

Syntax
getVariationAttributes( $LanguageID );
Input
$LanguageID (string)
language id for localized display values
Return
(array_ref)
Array of all variations attributes of the master product

getVariationsForSubproduct

Returns details about the variation attributes for a variation product

Syntax
getVariationsForSubproduct( $SubProduct, $APIBaseURL );
Input
$SubProduct (DE_EPAGES::Product::API::Object::Product)
A variation product
$APIBaseURL (string)
The base url of the REST API
Return
(hash_ref)
Hash reference with variation product details

new

Constructor

Syntax
new( $MasterProduct );
Input
$MasterProduct (DE_EPAGES::Product::API::Object::Product)
A master product
Return
$self (DE_EPAGES::Product::API::ProductVariationService)
self