Skip to main navigation Skip to main content Skip to page footer

Basket order on pre payment

An order has been successfully placed and an order number and invoice number have been assigned. For prepayment orders, shipping will only occur after full payment has been received.

The order is binding upon completion of the checkout process. Payment is made in advance by the customer and then manually recorded in the system. The order process is only completed once the payment has been processed and – if physical goods are involved – the order has been shipped.

stateDiagram-v2

    %% Frontend
    [*] --> prepared : Customer builds cart\nand starts checkout

    prepared --> ordered : Checkout completed\nConfirmation email\nInvoice number

    %% Payment required before shipping
    ordered --> paid : Payment recorded manually\n(payment received confirmed)

    %% Shipping & completion
    paid --> shipped : Goods shipped
    paid --> processed : Completed without shipping\n(e.g., digital service)

    shipped --> processed : Completed after shipping

    %% Cancellation due to 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 {
        prePayment {
            active = {$themes.configuration.extension.shop.checkout.prePayment.active}
            attachProductFilesToAdminEmail = {$themes.configuration.extension.shop.checkout.prePayment.attachProductFilesToAdminEmail}
            attachProductFilesToCustomerEmail = {$themes.configuration.extension.shop.checkout.prePayment.attachProductFilesToCustomerEmail}
            attachInvoiceToAdminEmail = {$themes.configuration.extension.shop.checkout.prePayment.attachInvoiceToAdminEmail}
            attachInvoiceToCustomerEmail = {$themes.configuration.extension.shop.checkout.prePayment.attachInvoiceToCustomerEmail}
            attachDeliveryNoteToAdminEmail = {$themes.configuration.extension.shop.checkout.prePayment.attachDeliveryNoteToAdminEmail}
            attachDeliveryNoteToCustomerEmail = {$themes.configuration.extension.shop.checkout.prePayment.attachDeliveryNoteToCustomerEmail}
            attachOrderXmlToAdminEmail = {$themes.configuration.extension.shop.checkout.prePayment.attachOrderXmlToAdminEmail}
            storeOrderXmlInFolder = {$themes.configuration.extension.shop.checkout.prePayment.storeOrderXmlInFolder}
            storeOrderXmlInFolderName = {$themes.configuration.extension.shop.checkout.prePayment.storeOrderXmlInFolderName}
            type = prePayment
            checkoutPid = {$themes.configuration.pages.shop.checkout}
            successPid = {$themes.configuration.pages.shop.checkoutSuccess}
            errorPid = {$themes.configuration.pages.shop.checkoutError}
            service = CodingMs\Shop\Service\Checkout\PrePaymentCheckoutService
            button {
                title = tx_shop_label.pre_payment_button_title
                label = tx_shop_label.pre_payment_button_label
                icon = fa fa-shopping-cart
            }
            fields {
                available = {$themes.configuration.extension.shop.checkout.prePayment.fields.available}
                required = {$themes.configuration.extension.shop.checkout.prePayment.fields.required}
            }
            status {
                prepared {
                    allowed {
                        ordered =
                    }
                }
                ordered {
                    allowed {
                        paid =
                        canceled_unpaid =
                    }
                }
                paid {
                    allowed {
                        shipped {
                            # Show marked-as-shipped when not "only digital products" are in basket-order
                            condition {
                                basket = NotContainsDigitalProductsOnly
                            }
                        }
                        processed {
                            # Show marked-as-shipped when "only digital products" are in basket-order
                            condition {
                                basket = ContainsDigitalProductsOnly
                            }
                        }
                    }
                }
                shipped {
                    # Hide whole shipped state when "only digital products" are in basket-order
                    hidden {
                        condition {
                            basket = ContainsDigitalProductsOnly
                        }
                    }
                    allowed {
                        processed =
                        returned {
                            # Show marked-as-returned when not "only digital products" are in basket-order
                            condition {
                                basket = NotContainsDigitalProductsOnly
                            }
                        }
                    }
                }
                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.prePayment.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.prePayment.customerConfirmation}
                }
                order {
                    active =  {$themes.configuration.extension.shop.checkout.prePayment.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.prePayment.order}
                }
            }
        }
    }
}
Documentation

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
Shopping basket 0 Products

The Demo is build with*

EXT:bootstrap_package for site-package aka theme build on Bootsrap 5.

EXT:modules for user plugins like user-profile, registration, user-addresses, and more.

EXT:shop for the whole shop functionality.

EXT:questions for the FAQ page and FAQs attached in the product detail views.

EXT:glossaries for the glossaries and definitions.

EXT:fluid_fpdf for generating invoices, delivery-notes, product-sheets and more.

EXT:parsedown_extra for rendering the extension documentations from markdown to HTML.

* There are only build-in settings made using site-settings & TypoScript – no templates or other files were changed or overridden!