Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.
Basket order on invoice
An order has been successfully placed and an order number and invoice number have been assigned.With the payment method "onInvoice," the goods can be shipped before or after payment is received.
The order is binding upon completion of the checkout process. Payment is subsequently made by the customer and manually recorded in the system.The order process is only completed once the payment has been received and—if the goods are physical—shipment has been carried out.
stateDiagram-v2
%% Frontend
[*] --> prepared : Customer builds cart\nand starts checkout
prepared --> ordered : Checkout completed\nConfirmation email\nInvoice number
%% Purchase on invoice: shipping before or after payment possible
ordered --> shipped : Shipping before payment\n(optional)
ordered --> paid : Payment recorded
%% Order flexible
shipped --> paid : Payment after shipping
paid --> shipped : Shipping after payment
%% Completion
paid --> processed : Completion without shipping\n(e.g., digital service)
shipped --> processed : Completion after shipping
%% Non-payment
ordered --> canceled_unpaid : No payment\nCancellation
canceled_unpaid --> processed : Cancellation completed
%% Conditions
note right of processed
Conditions:
- paid_date MUST be set
- shipped_date MUST be set
if shipping has occurred
end note
Further actions:
- Returns: Possible as soon as the goods have been shipped – i.e., in the status
shippedorprocessed. - Deletion: Deleting an order is only possible in the status
prepared.
TypoScript Configuration
plugin.tx_shop.settings.basketOrder {
orderOptions {
onInvoice {
active = {$themes.configuration.extension.shop.checkout.onInvoice.active}
attachProductFilesToAdminEmail = {$themes.configuration.extension.shop.checkout.onInvoice.attachProductFilesToAdminEmail}
attachProductFilesToCustomerEmail = {$themes.configuration.extension.shop.checkout.onInvoice.attachProductFilesToCustomerEmail}
attachInvoiceToAdminEmail = {$themes.configuration.extension.shop.checkout.onInvoice.attachInvoiceToAdminEmail}
attachInvoiceToCustomerEmail = {$themes.configuration.extension.shop.checkout.onInvoice.attachInvoiceToCustomerEmail}
attachDeliveryNoteToAdminEmail = {$themes.configuration.extension.shop.checkout.onInvoice.attachDeliveryNoteToAdminEmail}
attachDeliveryNoteToCustomerEmail = {$themes.configuration.extension.shop.checkout.onInvoice.attachDeliveryNoteToCustomerEmail}
attachOrderXmlToAdminEmail = {$themes.configuration.extension.shop.checkout.onInvoice.attachOrderXmlToAdminEmail}
storeOrderXmlInFolder = {$themes.configuration.extension.shop.checkout.onInvoice.storeOrderXmlInFolder}
storeOrderXmlInFolderName = {$themes.configuration.extension.shop.checkout.onInvoice.storeOrderXmlInFolderName}
type = onInvoice
checkoutPid = {$themes.configuration.pages.shop.checkout}
successPid = {$themes.configuration.pages.shop.checkoutSuccess}
errorPid = {$themes.configuration.pages.shop.checkoutError}
service = CodingMs\Shop\Service\Checkout\OnInvoiceCheckoutService
button {
title = tx_shop_label.order_on_invoice_button_title
label = tx_shop_label.order_on_invoice_button_label
icon = fa fa-shopping-cart
}
fields {
available = {$themes.configuration.extension.shop.checkout.onInvoice.fields.available}
required = {$themes.configuration.extension.shop.checkout.onInvoice.fields.required}
}
status {
prepared {
# Allowed to switch to this status
allowed {
ordered =
}
}
ordered {
allowed {
paid =
shipped {
# Show marked-as-shipped when not "only digital products" are in basket-order
condition {
basket = NotContainsDigitalProductsOnly
}
}
canceled_unpaid =
}
}
shipped {
# Hide whole shipped state when "only digital products" are in basket-order
hidden {
condition {
basket = ContainsDigitalProductsOnly
}
}
# Allowed to switch to this status
allowed {
paid {
# But it condition
condition {
# To have ordered_date not empty – it must be set!
ordered_date = NotEmpty
paid_date = Empty
}
}
processed {
# But it condition
condition {
# To have paid_date not empty – it must be set!
paid_date = NotEmpty
}
}
returned {
# Show marked-as-returned when not "only digital products" are in basket-order
condition {
basket = NotContainsDigitalProductsOnly
}
}
}
}
paid {
allowed {
shipped {
condition {
ordered_date = NotEmpty
shipped_date = Empty
}
}
processed {
condition {
shipped_date = NotEmpty
}
}
}
}
canceled_unpaid {
allowed {
processed =
}
}
processed {
allowed {
returned {
# Show marked-as-returned when not "only digital products" are in basket-order
condition {
basket = NotContainsDigitalProductsOnly
}
}
}
}
}
email {
customerConfirmation {
active = {$themes.configuration.extension.shop.checkout.onInvoice.email.customerConfirmation.active}
from {
name = {$themes.configuration.extension.shop.email.from.name}
email = {$themes.configuration.extension.shop.email.from.email}
}
to {
# Customer address data
}
template = {$themes.configuration.extension.shop.email.templates.onInvoice.customerConfirmation}
}
order {
active = {$themes.configuration.extension.shop.checkout.onInvoice.email.order.active}
from {
name = {$themes.configuration.extension.shop.email.from.name}
email = {$themes.configuration.extension.shop.email.from.email}
}
to {
name = {$themes.configuration.extension.shop.email.to.name}
email = {$themes.configuration.extension.shop.email.to.email}
}
template = {$themes.configuration.extension.shop.email.templates.onInvoice.order}
}
}
}
}
}
