ePages 6.10 - DE_EPAGES/ShopMailType/API/ShopMailType.pm

Package DE_EPAGES::ShopMailType::API::ShopMailType

object interface for ShopMailType.

Base
Exporter
@EXPORT_OK
GetShopMailType

Functions

GetShopMailType

GetShopMailType

Returns a ShopMailType object of a shop. If the object does not exist yet, it will be created from the corresponding MailTypeTemplate object. If the parameter $IfActive is true, then the function will return undef if the mail event is not active.

Syntax
$ShopMailType = GetShopMailType($Shop, $Alias)
$ShopMailType = GetShopMailType($Shop, $Alias, $IfActive)
Example
my $ShopMailType = GetShopMailType($Shop, 'CustomerWelcome', 1);
if( defined $ShopMailType ) {
    $ShopMailType->send( $Shop, {
            'TO' => $User->get('EMail'),
        }, {
            Locale   => 'de_DE',
            Language => 'de',
        }, {
            'Customer' => $Customer->tleHash,
            'User'     => $User->tleHash,
        }
    });
}
Input
$Shop (object)
shop object
$Alias (string)
alias of the ShopMailType and MailTypeTemplate object
$IfActive (boolean)
tells the function to return undef if the ShopMailType does
not exist or if it is not active
Return
$ShopMailType