ePages 7.3.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

getVariationAttributes
getVariationsForSubproduct
getVisibleSubProducts
new

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

getVisibleSubProducts

Returns all visible variation products from a master product

Syntax
getVisibleSubProducts( );
Return
(array_ref)
Array of variation products

new

Constructor

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