ePages 7.1.0 - DE_EPAGES/MultiStore/API/Test/SyncFunctions.pm

Package DE_EPAGES::MultiStore::API::Test::SyncFunctions

Helper functions for general synchronization operations

Base
Exporter
@EXPORT_OK
SyncOperation
ExportTestMasterShop
ImportTestSubShop
SelectMasterCategoryOnSubShopCatalogue
SelectProductSubShopCatalogue
SelectProductTypeSubShopCatalogue

Functions

ExportTestMasterShop
ImportTestSubShop
SelectMasterCategoryOnSubShopCatalogue
SelectProductSubShopCatalogue
SelectProductTypeSubShopCatalogue
SyncOperation

ExportTestMasterShop

Runs the Master export synchronization process.

Syntax
ExportTestMasterShop($hTestContext, $ExportAll);
Input
$hTestContext (hash.ref)
Test context
$ExportAll (boolean)
TRUE (1) if ALL master catalogue must be exported

ImportTestSubShop

Runs the SubShop import synchronization process.

Syntax
ImportTestSubShop($hTestContext, $ImportCount);
Input
$hTestContext (hash.ref)
Test context
$ImportCount (integer)
Number of import iterations (Default: 1)

SelectMasterCategoryOnSubShopCatalogue

Selects a Master category in a subshop catalogue.

Syntax
SelectMasterCategoryOnSubShopCatalogue($hSubShopInfo, $MasterCategoryPath, $SubShopRootCategory);
Input
$hSubShopInfo (hash.ref)
SubShop info (storename, shop alias, ...)
$MasterCategoryPath (string)
Category Path in Master catalogue
$SubShopRootCategory (string)
Parent Category Path in Subshop catalogue for target

SelectProductSubShopCatalogue

Selects a Master product in a subshop catalogue.

Syntax
SelectProductSubShopCatalogue($hSubShopInfo, $MasterProductPath, $SubShopRootCategory);
Input
$hSubShopInfo (hash.ref)
SubShop info (storename, shop alias, ...)
$MasterProductPath (string)
Product Path in Master catalogue
$SubShopRootCategory (string)
Parent Category Path in Subshop catalogue for target

SelectProductTypeSubShopCatalogue

Selects a Master category in a subshop catalogue.

Syntax
SelectProductTypeSubShopCatalogue($hSubShopInfo, $MasterCategoryPath, $SubShopRootCategory);
Input
$hSubShopInfo (hash.ref)
SubShop info (storename, shop alias, ...)
$MasterCategoryPath (string)
Category Path in Master catalogue
$SubShopRootCategory (string)
Parent Category Path in Subshop catalogue for target

SyncOperation

Runs code in a database connection

Syntax
SyncOperation($hTestContext, $CheckDataFile, $Operation);
Input
$hTestContext (hash.ref)
Test context
$CheckDataFile (string)
Filename for the expected sync metadata
$Operation (sub)
Code to run inside the master store connection