ePages 6.10 - DE_EPAGES/ShopConfiguration/API/Object/RemoteShop.pm

Package DE_EPAGES::ShopConfiguration::API::Object::RemoteShop

Provides access from the site database to a shop in a store database.

Base
DE_EPAGES::ShopConfiguration::API::Object::RemoteObject
Example
my $RemoteShop = DE_EPAGES::ShopConfiguration::API::Object::RemoteShop->new(ShopRef => $ShopRef);
# same as $RemoteShop = $ShopRef->remoteShop
$RemoteShop->applyFeatureValues;

Functions

applyFeatureValues
create
delete
export
getInfoSuperMerchant
getShopAddress
getShopFeatures
getShopMerchantEMails
importFiles
lastMerchantLogin
new
sendSuperMerchantNewPassword
setShopMerchantEMails
shopID
shopRef
shopService
shopTransferService
store
updateSuperMerchant

applyFeatureValues

Applies the currently allowed feature values to the shop. The allowed values are determined by the function

Syntax
$self->applyFeatureValues;

create

Creates a shop in the specified store database and adds a shop reference in the site database.

Syntax
$RemoteShop->create({
    Store => $Store,
    ShopAlias => $ShopAlias,
    ImportFiles => $aImportFiles,
});
Input
$hShop (ref.hash)
shop info to create a shop
  • IsClosed - shop is initialized closed by provider - boolean
  • Store - store database (default ShopRef.Store) - object
  • ShopAlias - unique shop alias for the store database (default ShopRef.Alias) - object
  • aImportFiles - list of file names to be imported (default ShopRef.ShopType.ShopImportFiles)- ref.array.string
  • PublicFilesDir - directory on the application server where image files
    for the new shop are located. These files are copied to the
    shop directory. (optional) - string
Return
$RemoteShop (object)
remote shop

delete

Deletes the remote shop

Syntax
$self->delete;

export

Export the remote shop to the given path

Syntax
$self->export;

getInfoSuperMerchant

Returns login and email of the primary administrator.

Syntax
$hValues = $self->getInfoSuperMerchant;
Return
$hValues (ref.hash.string)
merchant information hash:
  • Alias - login - string
  • EMail - e-mail address - string

getShopAddress

get the address from the shop.

Syntax
$hShopAddress = $self->getShopAddress;
Return
$hAddress (ref.hash)
address values

getShopFeatures

get the current feature values from the shop. The values are determined by the function DE_EPAGES::Shop::API::WebService::ShopService::getFeatureValues.

Syntax
$ahFeatureValues = $self->getShopFeatures;
Return
$ahFeatureValues (ref.array.hash)
feature values

getShopMerchantEMails

get the merchant email addresses from the shop.

Syntax
$aMerchantEMails = $self->getShopMerchantEMails;
Return
$aMerchantEMails (ref.array.hash.string)
address values

importFiles

Imports data from XML files into the remote shop in the store database.

Syntax
$self->importFiles( $aImportFiles );
Input
$aImportFiles (ref.array.string)
list of file names to be imported

lastMerchantLogin

Return the last login date and time by the Merchant in this Shop.

Syntax
$LastMerchantLogin = $self->lastMerchantLogin();
Input
$LastMerchantLogin (datetime)
the last login date and time

new

Creates a RemoteShop object from a ShopRef object.

Syntax
$RemoteShop = DE_EPAGES::ShopConfiguration::API::Object::RemoteShop->new(
    ShopRef => $ShopRef,
    ShopID => $ShopID
);
Input
$ShopRef (object)
shop reference object
$ShopID (integer)
(optional) object id within the store database
Return
$RemoteShop (object)
remote shop object

sendSuperMerchantNewPassword

Set password of the primary administrator, and sends him a email.

Syntax
$self->sendSuperMerchantNewPassword($Alias);
Input
$Alias (string)
super merchant login

setShopMerchantEMails

set the merchant email addresses from the shop.

Syntax
$self->setShopMerchantEMails(\@MerchantEMails);
Input
$aMerchantEMails (ref.array.hash.string)
address values

shopID

Returns the object id of the shop within the store database.

Syntax
$ShopID = $self->shopID;
Return
$ShopID (integer)
shop object id

shopRef

Returns the ShopRef object from the site database.

Syntax
$ShopRef = $self->shopRef;
Return
$ShopRef (object)
shop reference

shopService

Returns a web service client of the ShopService.

Syntax
$ShopService = $self->shopService;
$ShopService = $self->shopService( $Store );
Input
$Store (object)
(optional) Store object
Return
$ShopService (object)
web service client

shopTransferService

Returns a web service client of the ShopTransferService.

Syntax
$ShopTransferService = $self->shopTransferService;
$ShopTransferService = $self->shopTransferService( $Store );
Input
$Store (object)
(optional) Store object
Return
$ShopTransferService (object)
web service client

store

Returns the store database object where the shop data is stored.

Syntax
$Store = $self->store;
Return
$Store (object)
Store object or undef if the shop is deleted

updateSuperMerchant

Sets login, email and password of the primary administrator.

Syntax
$self->updateSuperMerchant($hValues);
Input
$hValues (ref.hash.string)
hash new values, all keys are optional:
  • Alias - login - string
  • EMail - e-mail address - string
  • Password - password (plain) - string