ePages 6.17.15 - 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
createSuperMerchantSession
delete
export
getInfoSuperMerchant
getShopAddress
getShopAttributeAliases
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

createSuperMerchantSession

Returns valid session and URL with session for the MBO logged in as supermerchant. If the shop attribute "GrantServiceAccessUntil" is a date in the past SessionId will be undef and Link to URL contains no session

Syntax
$hValues = $self->createSuperMerchantSession();
Input
$AlreadyGranted (boolean)
true if access is allowed without merchant grant
Return
$hValues (ref.hash)
hash with valid session and URL to MBO; keys:
  • SessionId | a valid SuperMerchant session | string
  • WebUrlAdminSSL | Link to MBO without SessionId | string
  • WebUrlAdminSSLWithSessionId | Link to MBO with session | string

delete

Deletes the remote shop

Syntax
$self->delete;

export

Export the remote shop to the given path

Syntax
$self->export;

getInfoSuperMerchant

Returns login, email and other information of the primary administrator.

Syntax
$hValues = $self->getInfoSuperMerchant;
Return
$hValues (ref.hash.string)
merchant information hash:
  • Alias | login | string
  • EMail | e-mail address | string
  • LocaleID | locale id | string
  • DeleteConfirmation | true if deletion should be confirmed | boolean
  • IsLoginCookieAllowed | true if user automated login over cookies is enabled | boolean
  • ShowFunctionHelp | true if function help is allowed | boolean

getShopAddress

get the address from the shop.

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

getShopAttributeAliases

get the attributes aliases from the shop.

Syntax
$hShopAttributeAliases = $self->getShopAttributeAliases;
Return
$hAttributeAliases (ref.hash)
attribute aliases

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
  • Password | password (encrypted) | string
  • EMail | email address | string
  • Name | name | string
  • LocaleID | locale id | string
  • DeleteConfirmation | true if deletion should be confirmed | boolean
  • IsLoginCookieAllowed | true if user automated login over cookies is enabled | boolean
  • ShowFunctionHelp | true if function help is allowed | boolean