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

Package DE_EPAGES::ShopConfiguration::API::PreCreatedShop

Helper functions for pre-creation of shops.

@EXPORT_OK
CountPreCreatedShops
GetPreCreatedShop
PreCreateShops

Functions

CountPreCreatedShops
GetPreCreatedShop
PreCreateShops

CountPreCreatedShops

Returns the current number of pre-created shops of a given shop type in the given store database.

Syntax
$Count = CountPreCreatedShops( $Provider, $Store, $ShopType );
Input
$Provider (object)
provider
$Store (object)
store database
$ShopType (object)
shop type
Return
$Count (integer)
current number of pre-created shops

GetPreCreatedShop

Returns a pre-created shop of a given shop type in the given store database. Returns undef if no such shop exists.

Syntax
$ShopRef = GetPreCreatedShop( $Provider, $Store, $ShopType );
Input
$Provider (object)
provider
$Store (object)
store database
$ShopType (object)
shop type
Return
$ShopRef (object)
ShopRef object (or undef)

PreCreateShops

Ensures that $Count shops of a given shop type are pre-created in the given store database. Creates additional shops if the current number is less than $Count.

Syntax
PreCreateShops($Provider, $Store, $ShopType, $Count, $aImportFiles, $PublicFilesDir);
Input
$Provider (object)
provider
$Store (object)
store database
$ShopType (object)
shop type
$Count (integer)
desired number of pre-created shops
$aImportFiles (array of strings)
import files with default shop data (optional)
$PublicFilesDir (string)
directory on the application server where image files
for the new shop are located. These files are copied to the
shop directory. (optional)