ePages 6.11.0 - DE_EPAGES/ShopConfiguration/API/ShopCount.pm

Package DE_EPAGES::ShopConfiguration::API::ShopCount

@EXPORT_OK
GetShopCount
GetAllShopCounts

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);
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 shop type, database and flags.

Syntax
$Count = GetShopCount({
    Provider => $Provider,
    ShopType => $ShopType,
    Store => $Store,
    IsClosed    => $IsClosed,
    IsTrialShop => $IsTrialShop,
    IsInternalTestShop => $IsInternalTestShop,
    IsPreCreated => $IsPreCreated,
});
Example
my $Count = GetShopCount({
    Provider => $Provider,
    ShopType => $Provider->shopType('ECommerce100'),
    Store => LoadObjectByPath('/Stores/Store'),
    IsClosed    => 0,
    IsTrialShop => 0,
    IsInternalTestShop => 0,
    IsPreCreated => 0,
});
Input
$Provider (object)
Provider object (optional)
$ShopType (object)
ShopType object (optional)
$Store (object)
Store object (optional)
$IsClosed (boolean)
true if the shop is closed by provider (optional)
$IsDeleted (boolean)
true if the shop is deleted by provider (optional)
$IsTrialShop (boolean)
true if the shop is in trial period (optional)
$IsInternalTestShop (boolean)
true if the shop is used for test or support purposes (optional)
$IsPreCreated (boolean)
true if the shop is pre-created (optional)
Return
$Count (integer)
number of matching shops