Package DE_EPAGES::Order::API::Order
This package provides the main customer order functions.
@EXPORT_OK |
Functions
- Basket2Order
- CreateOrder
- GenerateOrderDocumentPDF
- GetEditableOrder
- GetLatestOrderInvoice
- SendOrderConfirmationMail
- SendOrderDocumentAsPDFMail
- SendStatusChangeMail
- SendStatusChangeMails
Basket2Order
Creates a customer order by a basket and deletes the basket at the end. Addresses will be copied and lineitemcontainer will be moved to new order.
Syntax |
$Order = Basket2Order($Basket); $Order = Basket2Order($Basket, $hOptions); |
Example |
$Order = Basket2Order($Basket, { SendConfirmationMail => 1 }); |
Input |
|
Return |
|
Hook |
|
CreateOrder
Creates an empty order which will belong to the given customer. Addresses are copied and an empty lineitemcontainer is added.
Syntax |
$Order = CreateOrder($Customer, $hVars); |
Input |
|
Return |
|
GenerateOrderDocumentPDF
Converts order document (invoice, packing slip or credit note) to pdf document
Syntax |
$hFileInfos = GenerateOrderDocumentPDF($Invoice); |
Input |
|
Return |
|
GetEditableOrder
Returns the editable order (copy and possible changed copy of order). If no editable order exists this function returns undef.
Syntax |
$EditableOrder = GetEditableOrder($Order); |
Input |
|
Return |
|
GetLatestOrderInvoice
Returns the latest invoice document of an order
Syntax |
GetLatestOrderInvoice($Order); |
Input |
|
Return |
|
SendOrderConfirmationMail
Send a confirmation mail to customer (Order.BillingAddress.EMail is used). The activated shop mail type 'CustomerOrderConfirmation' is used to define the content of the mail.
Syntax |
SendOrderConfirmationMail($Order); |
Input |
|
SendOrderDocumentAsPDFMail
Send an order document as pdf file mail to customer (Order.BillingAddress.EMail is used). The activated shop mail type 'OrderDocumentPDF' is used to define the content of the mail.
Syntax |
SendOrderDocumentAsPDFMail($OrderDocument); |
Input |
|
SendStatusChangeMail
Send a status changed mail to customer (Order.BillingAddress.EMail is used). The activated shop mail type 'CustomerOrderStatus$Event' is used to define the content of the mail. This mail will not be send on event 'ArchivedOn'.
Syntax |
SendStatusChangeMail($Order, $Event); |
Input |
|
SendStatusChangeMails
Sends order status notification e-mails to the customer if a status was set (from null to not null). The e-mail address Order.BillingAddress.EMail is used. See also SendStatusChangeMail.
Syntax |
SendStatusChangeMails($Order, $hOldStatus, $hNewStatus); |
Input |
|