OrderActions

Class OrderActions

category

System

package

Extensions

subpackage

Orders

Methods

Outputs a bulk PDF file through the use of mPDF.

_createBulkPdf(array $orderIds, string $type) 

This method will parse the latest generated PDFs of the provided orders and will concatenate them into a single file. This file will be then outputted directly so that browsers download it immediately.

see \mPDF
Throws
\Mpdf\MpdfException

Arguments

$orderIds

array

The selected order IDs.

$type

string

Bulk PDF type ('invoice' or 'packingslip').

Gets the Name of an order status by status ID and language ID

_getOrderStatusName(\IdType $orderStatusId, \IdType $languageId) : string

Arguments

$orderStatusId

\IdType

The status ID

$languageId

\IdType

The language ID

Response

string

The name of the status

Generate the PDF permissions depending the shop configuration.

_getPdfPermissions() : array

Outputs the concatenated invoice PDFs.

bulkPdfInvoices(array $orderIds) 
Throws
\Mpdf\MpdfException

Arguments

$orderIds

array

The order IDs to be included in the concatenated file.

Outputs the concatenated packing-slip PDFs.

bulkPdfPackingSlips(array $orderIds) 
Throws
\InvalidArgumentException

Arguments

$orderIds

array

The order IDs to be included in the concatenated file.

Cancels an order.

cancelOrder(array $orderIds, \BoolType $restockQuantity, \BoolType $recalculateShippingStatus, \BoolType $resetArticleStatus, \BoolType $notifyCustomer, \BoolType $sendComment, \StringType|null $comment = null) 

The method use the old logic of the gm_send_orders.php file and will be refactored soon.

Arguments

$orderIds

array

$restockQuantity

\BoolType

$recalculateShippingStatus

\BoolType

$resetArticleStatus

\BoolType

$notifyCustomer

\BoolType

$sendComment

\BoolType

$comment

\StringType|null

changeOrderStatus

changeOrderStatus(\IdType $orderId, \IdType $statusId, \StringType $comment, \BoolType $notifyCustomer, \BoolType $sendParcelTrackingCode, \BoolType $sendComment, \IdType $customerId = null) 

Arguments

$orderId

\IdType

$statusId

\IdType

$comment

\StringType

$notifyCustomer

\BoolType

$sendParcelTrackingCode

\BoolType

$sendComment

\BoolType

$customerId

\IdType

Removes an order.

removeOrderById(\IdType $orderId, \BoolType|null $restockQuantity = null, \BoolType|null $recalculateShippingStatus = null, \BoolType|null $resetProductStatus = null) 

The method use the old logic of the xtc_remove_order function and will be refactored soon.

Arguments

$orderId

\IdType

$restockQuantity

\BoolType|null

$recalculateShippingStatus

\BoolType|null

$resetProductStatus

\BoolType|null