Package DE_EPAGES::ShopConfiguration::API::ShopCount
Counts the number of shops that are registered in the Site
database.
Functions
- GetAllShopCounts
- GetShopCount
GetAllShopCounts
Returns the number of shops of a provider from all databases.
Deleted shops and internal test shops are not included.
Syntax |
$ahCounters = GetAllShopCounts($Provider);
|
Input |
- $Provider (object)
- provider
|
Return |
- $ahCounters (ref.array.hash)
- list of shop counters. Each list element is a hsh with
following keys:
- Database - database alias - string
- ShopType - shop type alias - string
- Trial_Closed - shop count (IsTrialShop && IsClosed && !IsPreCreated) - integer
- Trial_NotClosed - shop count (IsTrialShop && !IsClosed && !IsPreCreated) - integer
- NotTrial_Closed - shop count (!IsTrialShop && IsClosed && !IsPreCreated) - integer
- NotTrial_NotClosed - shop count (!IsTrialShop && !IsClosed && !IsPreCreated) - integer
- PreCreated - shop count (IsPreCreated) - integer
|
GetShopCount
Returns the number of shops of a provider, filtered by provider,
shop type, database and flags.
Syntax |
$Count = GetShopCount( $hOptions );
|
Example |
my $Count = GetShopCount({
Provider => $Provider,
ShopType => $Provider->shopType('ECommerce100'),
Store => LoadObjectByPath('/Stores/Store'),
IsClosed => 0,
IsTrialShop => 0,
IsInternalTestShop => 0,
IsPreCreated => 0,
});
|
Input |
- $hOptions
- filter options
- Provider - Provider (optional) - object
- ShopType - ShopType (optional) - object
- Store - Store database (optional) - object
- IsClosed - true if the shop is closed by provider (optional) - boolean
- IsDeleted - true if the shop is deleted by provider (optional) - boolean
- IsTrialShop - true if the shop is in trial period (optional) - boolean
- IsInternalTestShop - true if the shop is used for test or support purposes (optional) - boolean
- IsPreCreated - true if the shop is pre-created (optional) - boolean
|
Return |
- $Count (integer)
- number of matching shops
|