ePages 6.10 - DE_EPAGES/Product/API/Object/PagerLoopProducts.pm

Package DE_EPAGES::Product::API::Object::PagerLoopProducts

Implements a pager for sorting a list of products.

Base
DE_EPAGES::Presentation::API::Object::PagerLoop

Functions

sortObjects

sortObjects

Sorts a list of products by the 'OrderBy' and 'OrderDesc' input fields. Gets attribute values by "$Product->getWithParent" to account for inherited attribute values of sub products. Special handling of the "ListPrice" attribute: - use $Product->getListPrice( $self->{CurrencyID} ) if $self->{CurrencyID} is defined, - throws an error if CurrencyID is not defined

Syntax
$aSortedObjects = $Object->sortObjects($aObjects);
Input
$aObjects (ref.array.object)
list of all products
Return
$aSortedObjects (ref.array.object)
sorted list of products