ePages 6.11.0 - DE_EPAGES/ShopConfiguration/API/WebService/ShopConfigService.pm

Package DE_EPAGES::ShopConfiguration::API::WebService::ShopConfigService

Provides web service access to create and delete shops

Example
use DE_EPAGES::WebService::API::Client;
my $ShopConfigService = DE_EPAGES::WebService::API::Client
    ->uri('urn://epages.de/WebService/ShopConfigService/2005/03')
    ->proxy("http://localhost:80/epages/Site.soap");
$ShopConfigService->userinfo( "/Users/$Login:$Password" );
$ShopConfigService->delete({
    Alias => 'DemoShop'
});

Functions

create
delete
deleteShopRef
exists
getAllInfo
getInfo
new
update

create

Creates a new shop within the given database on behalf of the current provider. The new shop is given the feature set of the specified shop type. Initial shop data are imported from import file(s). These import files must be pre-configured corresponding to the shop's feature set. Some example import files are located in the directory %EPAGES_CARTRIDGES%/DE_EPAGES/DemoShop/Database/XML.

Syntax
$ShopID = $ShopConfigService->create({
    ShopType => $ShopType,
    Database => $Database,
    Alias => $Alias,
    ShopAlias => $ShopAlias,
    IsClosed    => $IsClosed,
    DomainName  => $DomainName,
    HasSSLCertificate => $HasSSLCertificate,
    WebServerScriptNamePart => $WebServerScriptNamePart,
    IsTrialShop => $IsTrialShop,
    IsInternalTestShop => $IsInternalTestShop,
    ImportFiles => $aImportFiles,
    PublicFilesDir => $PublicFilesDir,
})->result;
Example
my $ShopID = $ShopConfigService->create({
    ShopType => 'ECommerce100',
    Database => 'Store',
    Alias => 'DemoShop',
    ShopAlias => 'DemoShop',
    IsClosed    => 0,
    DomainName  => 'www.myshop.biz',
    HasSSLCertificate => 1,
    WebServerScriptNamePart => 'demoshop',
    IsTrialShop => 0,
    IsInternalTestShop => 0,
    ImportFiles => [
        '\\Server\Shared\Distributor\CommonData.xml',
        '\\Server\Shared\Distributor\ExampleProducts.xml',
        '\\Server\Shared\Distributor\Styles.xml',
    ],
    PublicFilesDir => '\\Server\Shared\Distributor\ShopImages'
})->result;
Input
$ShopType (string)
shop type alias
$Database (string)
database identifier (store alias)
$Alias (string)
unique shop name for the provider
$ShopAlias (string)
unique shop name for the database
$IsClosed (boolean)
true if the new shop is closed by provider (optional, default: 0)
$DomainName (string)
domain name to access the shop (optional)
$HasSSLCertificate (string)
true if the web server has an SSL certificate
for the shop (optional)
$WebServerScriptNamePart (string)
script name part of the shop (optional)
$IsTrialShop (boolean)
true if the shop is in trial period (optional, default: 0)
$IsInternalTestShop (boolean)
true if the shop is used for test or support purposes (optional, default: 0)
$aImportFiles (string)
list of import files contianing initial shop date. These
files must be accessible for the application servers that are
responsible for the specified database
$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)
Return
$ShopID (integer)
object id of the shop within the database

delete

Deletes a shop on behalf of the provider. The shop data is deleted permanently from the shop database, but a reference to the deleted shop remains in the site database for accounting and statistics purposes. To remove this shop reference from the site database use deleteShopRef

Syntax
$ShopConfigService->delete({
    Alias => $Alias
});
Example
$ShopConfigService->delete({
    Alias => 'DemoShop'
});
Input
$Alias (string)
unique shop name for the provider

deleteShopRef

Deletes a shop reference from the site database. Call this funtion after the shop data has been deleted with delete or when the shop database is no longer accessible. Do not call this function while the shop data still exists in the shop database!

Syntax
$ShopConfigService->deleteShopRef({
    Alias => $Alias
});
Example
$ShopConfigService->delete({
    Alias => 'DemoShop'
});
Input
$Alias (string)
unique shop name for the provider

exists

Returns true if the provider has a shop with the given alias name.

Syntax
$Exists = $ShopConfigService->exists({
    Alias => $Alias
})->result;
Example
print "hurray" if $ShopConfigService->exists({
    Alias => 'DemoShop'
})->result;
Input
$Alias (string)
unique shop name for the provider

getAllInfo

Returns information about all shops of the provider.

Syntax
$ahShopInfo = $ShopConfigService->getAllInfo()->result;
Return
$hShopInfo (ref.array.hash.string)
list of shop data. each element has the structure
  • Provider - provider alias - string
  • Alias - unique shop name for the provider - string
  • ShopType - shop type alias - string
  • Database - store database identifier - string
  • ObjectPath - object path of the shop in the store database - string
  • IsClosed - true if closed by provider - boolean
  • IsDeleted - true if deleted in store database - boolean
  • DomainName - shop domain name - string
  • HasSSLCertificate - true if the web server has an SSL certificate
    for the shop - string

getInfo

Returns information about a shop from the site database.

Syntax
$hShopInfo = $ShopConfigService->getInfo({
    Alias => $Alias
})->result;
Input
$Alias (string)
unique shop name for the provider
Return
$hShopInfo (ref.hash.string)
shop data
  • Provider - provider alias - string
  • Alias - unique shop name for the provider - string
  • ShopType - shop type alias - string
  • Database - store database identifier - string
  • ObjectPath - object path of the shop in the store database - string
  • IsClosed - true if closed by provider - boolean
  • IsDeleted - true if deleted in store database - boolean
  • DomainName - shop domain name - string
  • HasSSLCertificate - true if the web server has an SSL certificate
    for the shop - string

new

Creates a new web service object as a blessed hash reference and adds the values from the %Options hash.

Syntax
$Service = DE_EPAGES::ShopConfiguration::API::WebService::ShopConfigService->new( %Options );
Input
%Options (hash)
user-defined values
Return
$Service (object)
web service object

update

Updates a shop by changing the shop type, setting the status or importing data from XML files.

Syntax
$ShopConfigService->update({
    Alias => $Alias,
    ShopType => $ShopType,
    IsClosed => $IsClosed,
    DomainName => $DomainName,
    HasSSLCertificate => $HasSSLCertificate,
    WebServerScriptNamePart => $WebServerScriptNamePart,
    IsTrialShop => $IsTrialShop,
    IsInternalTestShop => $IsInternalTestShop,
    ImportFiles => $ImportFiles,
});
Input
$Alias (string)
unique shop name for the provider
$ShopType (string)
(optional) new shop type alias
$IsClosed (boolean)
(optional) true if closed by provider
$DomainName (string)
(optional) domain name to access the shop
$HasSSLCertificate (string)
true if the web server has an SSL certificate
for the shop (optional)
$WebServerScriptNamePart (string)
script name part of the shop (optional)
$IsTrialShop (boolean)
true if the shop is in trial period (optional, default: 0)
$IsInternalTestShop (boolean)
true if the shop is used for test or support purposes (optional, default: 0)
$ImportFiles (ref.array.string)
(optional) list of files names to import