ePages 7.25.0 - DE_EPAGES/Order/API/OrderDocument.pm

Package DE_EPAGES::Order::API::OrderDocument

object interface for Order Documents.

@EXPORT_OK
CreateOrderDocument
CreateShippingLabel
CreateCustomerInformationPDF
GetCustomerInformationPDFFileName
GetCustomerInformationPDFLocation
GetCustomerInformationPDFAttachment
GetCustomerInformationPDFWebFileName

Functions

CreateCustomerInformationPDF
CreateOrderDocument
CreateShippingLabel
GetCustomerInformationPDFAttachment
GetCustomerInformationPDFFileName
GetCustomerInformationPDFLocation
GetCustomerInformationPDFWebFileName

CreateCustomerInformationPDF

Creates a new customer information PDF in the given language.

Syntax
CreateCustomerInformationPDF($CustomerInformation, $LanguageID);
Input
$CustomerInformation (object)
CustomerInformation content object
$LanguageID (integer)
language
Return
$Success (boolean)
true if a PDFs was written

CreateOrderDocument

Creates a new packing slip object for the given Order object.

Syntax
$Document = CreateOrderDocument( $Order, $DocumentTypeName, $DocumentTypePlural);
$Document = CreateOrderDocument( $Order, $DocumentTypeName, $DocumentTypePlural, $hOptions );
Example
my $Invoice = CreateOrderDocument($Order, 'Invoice', 'Invoices');
my $Invoice = CreateOrderDocument(
    $Order,
    'Invoice,
    'Invoices',
    {
        'DeliveryDate' => $DeliveryDate,
        'IssueDate' => $IssueDate
    }
);
Input
$Order (object)
order object
$DocumentTypeName (string)
class package name of the document type, i.e.
'Invoice'
$DocumentTypePlural (string)
"plural" class package name of the document type,
i.e. 'Invoices'
$hOptions
optional attributes of new object
  • Alias - object alias - string
  • DeliveryDate - datetime object for delivery date - object
  • IssueDate - datetime object for issue date - object
  • Issued - finalize the document (optional) - boolean
Return
$PackingSlip (object)
packing slip object

CreateShippingLabel

Creates a new shipping label object for the given Order object ( if the order has assigned a ShippingFulfillmentMethod )

Syntax
$Label = CreateShippingLabel( $Order);
Example
my $Label = CreateShippingLabel($Order);
Input
$Order (object)
order object
Return
$ShippingLabel (object)
shipping label object

GetCustomerInformationPDFAttachment

Returns the PDF full filename to use as mail attachment. Creates a new customer information PDF if it wasn't created yet.

Syntax
GetCustomerInformationPDFAttachment($Shop, $LanguageID);
Input
$Shop (object)
shop object
$LanguageID (integer)
language
Return
$hAttachment (ref.hash)
hash with the PDF filename

GetCustomerInformationPDFFileName

Returns the PDF full filename.

Syntax
GetCustomerInformationPDFFileName($Shop, $LanguageID);
Input
$Shop (object)
shop object
$LanguageID (integer)
language
Return
$FileName (string)
full PDF filename

GetCustomerInformationPDFLocation

Returns the folder which contains the generated PDFs. Each resides in a language folder, which is added during creation.

Syntax
GetCustomerInformationPDFLocation($Shop);
Input
$Shop (object)
shop object
Return
$Location (string)
folder for the generated PDFs

GetCustomerInformationPDFWebFileName

Returns the PDF web filename (including shop URL).

Syntax
GetCustomerInformationPDFWebFileName($Shop, $LanguageID);
Input
$Shop (object)
shop object
$LanguageID (integer)
order language
Return
$FileName (string)
full PDF filename