OrderDocumentCreation

Extends

package

Default

Methods

Creates and returns a new cancellation document of given `$documentType` for the given `$order`. The created document will only contain the positions contained in `$positions`.

createOrderCancellationDocument(\Shopware\Models\Order\Order $order, \Shopware\Models\Document\Document $documentType, array $positions, string $invoiceNumber, string $comment, string|null $dateString, boolean $cancelShippingCost) : \Shopware\Models\Order\Document\Document

This method supports creating multiple documents of the same type for a single order.

Arguments

$order

\Shopware\Models\Order\Order

$documentType

\Shopware\Models\Document\Document

$positions

array

$invoiceNumber

string

$comment

string

$dateString

string|null

A formatted date string for the invoice. If null, date of today is used.

$cancelShippingCost

boolean

Response

\Shopware\Models\Order\Document\Document

Creates and returns a new document of given `$documentType` for the given `$order`.

createOrderDocument(\Shopware\Models\Order\Order $order, \Shopware\Models\Document\Document $documentType, array $documentConfig = array()) : \Shopware\Models\Order\Document\Document

Arguments

$order

\Shopware\Models\Order\Order

$documentType

\Shopware\Models\Document\Document

$documentConfig

array

Response

\Shopware\Models\Order\Document\Document

Outputs a preview of a cancellation document to the client.

showOrderCancellationDocumentPreview(\Shopware\Models\Order\Order $order, \Shopware\Models\Document\Document $documentType, array $positions, string $invoiceNumber, string $comment, string|null $dateString, boolean $cancelShippingCost) 

Script execution is ended after output.

Arguments

$order

\Shopware\Models\Order\Order

$documentType

\Shopware\Models\Document\Document

$positions

array

$invoiceNumber

string

$comment

string

$dateString

string|null

A formatted date string for the invoice. If null, date of today is used.

$cancelShippingCost

boolean