ePages 6.11.0 - DE_EPAGES/Product/API/Object/PagerProducts.pm

Package DE_EPAGES::Product::API::Object::PagerProducts

Pager for all products of a shop. Allows sorting by product attributes and list price,

Base
DE_EPAGES::Presentation::API::Object::Pager

Functions

countItems
items
sortObjects

countItems

Returns the total number of products in the shop.

Syntax
$Count = $Pager->countItems;
Return
$Count (integer)
number of items

items

Return a list of all products on a page.

Syntax
$aProducts = $Pager->items($PageNumber);
Input
$PageNumber (integer)
current page number
Return
$aProducts (ref.array.object)
list of products

sortObjects

Sorts the objects according to the 'OrderBy' and 'OrderDesc' attributes. The parameter CurrencyID is required for sorting by ListPrice. For sorting by attributes with value selection, add ".Value", for example OrderBy => 'Size.Value'. See also: DE_EPAGES::Product::API::Object::PagerLoopProducts::sortObjects.

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