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 |
Functions
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 |
|
GetTopSellerForShop
Get list of TopSeller sorted arcording their sales rank. The JSON output is a list of hashes with following keys for each element.
- productId - product or product bundle - integer
- count - number of times sold - integer
- thumbnail - URI to xs image of product or placeholder string - string
- NO_IMAGE - no image is for the sub-/product available
- BUNDLED_PRODUCT_IMAGE - product is bundled product and has no image
- name - name or alias of the product - localized string
Syntax |
$JSONTopSeller = GetTopSellerForShop($Shop, $LanguageID, $NumberOfResults); |
Input |
|
Return |
|