ePages 7.47.0 - DE_EPAGES/MultiStore/API/Synchronization.pm

Package DE_EPAGES::MultiStore::API::Synchronization

MultiStore - Synchronization module

Base
Exporter
@EXPORT_OK
AddSubShopObject
ClassAliasFromObjectPath
GetMasterXMLDir
GetMasterXMLFile
GetPreDefAttributeMasterPath
GetProductTypePreDefAttributes
ImportProduct
ImportProductType
ImportSubShop
IsAffiliateVisible

Functions

AddSubShopObject
ClassAliasFromObjectPath
GetMasterXMLDir
GetMasterXMLFile
GetPreDefAttributeMasterPath
GetProductTypePreDefAttributes
ImportProduct
ImportProductType
ImportSubShop
IsAffiliateVisible
TransformImportXML

AddSubShopObject

Clones a product or content object from the master shop to a sub shop.

Syntax
$SubShopObject = AddSubShopObject($SubShopCategory, $MasterObjectPath);
Input
$SubShopCategory (DE_EPAGES::Content::API::Object::Category)
sub shop category
$MasterObjectPath (string)
relative object path to a product or content object in the master shop
Return
$SubShopObject (DE_EPAGES::Content::API::Object::ContentObject)
sub shop object

ClassAliasFromObjectPath

Detects the class alias from the given "ObjectPath".

Syntax
my $ClassAlias = ClassAliasFromObjectPath($ObjectPath);
Input
$ObjectPath (String)
Object path
Return
$ClassAlias (String)
Class alias.

GetMasterXMLDir

Detects the MasterShops XML directory from the given "MasterObjectPath".

Syntax
my $Dir = GetMasterXMLDir($Shop, $MasterObjectPath);
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
Shop object
$MasterObjectPath (String)
Relative path to MasterShop object.
Return
$Dir (String)
The MasterShops XML directory.

GetMasterXMLFile

Detects the MasterShops object XML file from the given "MasterObjectPath".

Syntax
my $XMLFile = GetMasterXMLFile($Shop, $MasterObjectPath);
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
Shop object
$MasterObjectPath (String)
Relative path to MasterShop object.
Return
$XMLFile (String)
The MasterShops objects XML file.

GetPreDefAttributeMasterPath

Returns the MasterPath of a PreDefAttribute

Syntax
$MasterPath = GetPreDefAttributeMasterPath( $PreDefAttribute );
Input
$PreDefAttribute (object)
PreDefAttribute
Return
$MasterPath (string)
master path

GetProductTypePreDefAttributes

Returns all predef attributes of the imported product types

Syntax
$aProductTypePreDefAttributes = GetProductTypePreDefAttributes( $ShopID );
Input
$ShopID (integer)
Subshop ID
Return
$aProductTypePreDefAttributes (ref.array)
predef attributes of subshop product types

ImportProduct

Import a new product.

Syntax
ImportProduct($Shop, $MasterObjectPath);
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
Shop object
$MasterObjectPath (String)
Relative path to MasterShop object.
Return
$Product (DE_EPAGES::MultiStore::API::Object::SubShopProduct)
The imported SubShop product.

ImportProductType

Import a new product type.

Syntax
ImportProductType($Shop, $Alias, $Update);
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
Shop object
$Alias (String)
Alias of the new product type.
$Update (Boolean)
Do an update if the type already exists.
Return
$SubShopProductType (DE_EPAGES::MultiStore::API::Object::SubShopProductType)
The imported SubShop object itself.

ImportSubShop

Imports OverwritableAttributes and ContentObjects into (Sub)Shop.

Syntax
ImportSubShop($Shop)
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
shop object

IsAffiliateVisible

Determines the visibility of a MasterShop object for a certain SubShop.

Syntax
IsAffiliateVisible($SubShop, $MasterObjectPath, $ClassAlias)
Input
$SubShop (DE_EPAGES::Shop::API::Object::Shop)
SubShop object
$MasterObjectPath (String)
relative object path of MasterShop object, e.g. '/Categories/Tents'
$ClassAlias (String)
Class alias of the object, which is wanted to import into the SubShop, e.g. 'Category'
Return
$IsVisible (Boolean)
Information if wanted MasterShop object is visible for the given SubShop

TransformImportXML

Transformation of some attributes during import of an object.

Syntax
TransformImportXML($Object, $TagName, $hAttributes)
Input
$Object (DE_EPAGES::Object::API::Object::Object)
obejct
$TagName (String)
tag name
$hAttributes (ref.hash)
attributes of the tag