Bitte beachte, dass sich diese Dokumentation auf die neuste Version dieser Erweiterung bezieht. Wenn eine ältere Version eingesetzt wird, kann diese abweichen. Die jeweils passende Dokumentation befindet sich im Dokumentation-Verzeichnis der Erweiterung.
Warenkorb Bestellung auf Rechnung
Eine Bestellung wurde erfolgreich aufgegeben und es wurde eine Bestell- sowie Rechnungsnummer vergeben.Bei der Zahlart Rechnung (onInvoice) kann die Ware vor oder nach dem Zahlungseingang versendet werden.
Die Bestellung gilt ab dem Abschluss des Checkouts als verbindlich. Die Zahlung erfolgt nachgelagert durch den Kunden und wird manuell im System verbucht.Der Bestellprozess wird erst dann abgeschlossen, wenn die Zahlung erfasst und – sofern es sich um physische Ware handelt – der Versand durchgeführt wurde.
stateDiagram-v2
%% Frontend
[*] --> prepared : Kunde stellt Warenkorb zusammen\nund startet Checkout
prepared --> ordered : Checkout abgeschlossen\nBestätigungsmail\nRechnungsnummer
%% Rechnungskauf: Versand vor oder nach Zahlung möglich
ordered --> shipped : Versand vor Zahlung\n(optional)
ordered --> paid : Zahlung verbucht
%% Reihenfolge flexibel
shipped --> paid : Zahlung nach Versand
paid --> shipped : Versand nach Zahlung
%% Abschluss
paid --> processed : Abschluss ohne Versand\n(z. B. digitale Leistung)
shipped --> processed : Abschluss nach Versand
%% Nichtzahlung
ordered --> canceled_unpaid : Keine Zahlung\nStorno
canceled_unpaid --> processed : Storno abgeschlossen
%% Conditions
note right of processed
Conditions:
- paid_date MUSS gesetzt sein
- shipped_date MUSS gesetzt sein,
falls Versand erfolgt ist
end note
Weitere Aktionen:
- Retoure: Möglich sobald die Ware versandt wurde – d. h. im Zustand
shippedoderprocessed. - Löechen: Das Löschen einer Bestellung ist nur im Status
preparedmöglich.
TypoScript Konfiguration
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
ordered_date = NotEmpty
}
}
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}
}
}
}
}
}
