ePages 6.17.13 - DE_EPAGES/Product/API/TopSeller.pm

Package DE_EPAGES::Product::API::TopSeller

API functions related to TopSeller - products and product bundles
The list TopSeller are updated once per night via scheduler [UpdateTopSeller]

@EXPORT_OK
GetTopSellerForShop
CollectTopSellerStatistic

Functions

CollectTopSellerStatistic
GetTopSellerForShop

CollectTopSellerStatistic

This function collect stats about sold products by counting lineitems of not canceled orders of last 30 (default) days.

Syntax
CollectTopSellerStatistic(%Options);
Example
CollectTopSellerStatistic();
CollectTopSellerStatistic(Days => 7);
Input
%Options (hash)
optional parameter keys:
  • Days | number of days considered for statistic | Integer

GetTopSellerForShop

Get list of TopSeller sorted arcording their sales rank. The JSON output is a list of hashes with following keys for each element.

Note: Possible placeholder values for the thumbnail key are:

Syntax
$JSONTopSeller = GetTopSellerForShop($Shop, $LanguageID, $NumberOfResults);
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
current shop
$LanguageID (integer)
required for access localized attributes
$NumberOfResults (integer)
maximum list size
Return
$hJSONTopSeller (hash.ref.)
with following keys:
  • JSON - see description for details - string
  • Count - items in JSON - integer