Loading...
Skip navigation
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 shipped or processed.
  • 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}
                }
            }
        }
    }
}
Last change: 2026-04-23
Documentation
TYPO3 Shop Extension

TYPO3 Shop by coding.ms

An extensive shop for TYPO3 for realizing Webshops, Online-Shops or Payment-Subscriptions, comparable with tt_products, Cart or Aimeos. It includes PayPal, PayPal-Checkout, Klarna, Stripe, Bookmarks, UPS-API, invoice generation, a backend module, compare feature, graduated prices, plus product variants, filters, and tax and shipping logic for practical shop operations.

Menu

Contact request

You can contact us at any time

Stop! Playing in the meantime?
Stop! Playing in the meantime?
Stop! Playing in the meantime?

Stop! Playing in the meantime?

Break the highscore

Press Start
Contact request
Screenreader label
Security question
23I_________MT3______
9_H____N____O_____7WB
C_G___MC8___MUG______
1_J____T____M_E___LE3
68K_________N9F______