Skip to content

Feature: Add Online order type, external order ID mapping, & online receipt header banner #284

Closed

Description

@khaira777

Important

Status: Needs maintainer review — ported from fork anbarasakumar/FloCafe. Requires maintainer review/approval before implementation.

Online Aggregator & Web Order Support Request

Extracted from fork anbarasakumar/FloCafe:

Overview

Adds support for taking and processing online orders coming from third-party delivery platforms or online web ordering systems (e.g. Swiggy, Zomato, UberEats, DoorDash, custom web store).

Proposed Changes

  1. Order Type & Cart Panel Input:
    • Add online to orderType options (counter, dine_in, takeaway, delivery, online).
    • Add UI inputs in CartPanel.tsx for selecting the online platform name and entering the external order ID.
  2. Schema & API Updates:
    • Add external_order_id column to orders table (main/db.ts).
    • Persist external_order_id and onlinePlatform in order creation payload (main/routes/orders.ts).
  3. Thermal Receipt Banner:
    • Update receipt encoder (frontend/src/lib/printer/receipt-encoder.ts) to render a prominent "ONLINE ORDER" header banner displaying the platform name and external order ID.
  4. Reference Commits:
    • Commits ee0bd53, 5642272, 3a9eec7, fca1af1, 048a2ff in anbarasakumar/FloCafe.

What already exists

online already appears in the i18n suffix keys (orderTypeSuffix_online) and in PrepaidCheckoutModal's OrderType union, but the cart flow (frontend/src/store/cart.ts) still only types dine_in | takeaway | delivery. Treat this as wiring the existing scaffolding end-to-end, not greenfield.

Acceptance criteria

  • online added to the orderType options (platform + external order ID input in CartPanel).
  • external_order_id column + persistence in the order creation payload.
  • Thermal receipt renders an "ONLINE ORDER" banner with platform + external order ID.

Activity

  1. khaira777 commented on Aug 16, 2026

    @khaira777
    ContributorAuthor

    Verdict: VALID BUT NEEDS RESCOPING — mostly feature completion; the API already accepts online

    Findings:

    • online is already a valid order type in the API: main/routes/orders.ts:388 (['dine_in','takeaway','delivery','online']). What's missing is the rest of the feature: the UI only offers dine_in/takeaway/delivery (frontend/src/components/pos/CartPanel.tsx:76-80), there is no external_order_id column (orders schema main/db.ts:4154-4189), and no online receipt banner.
    • The referenced frontend/src/lib/printer/receipt-encoder.ts exists, but ESC/POS receipts are formatted in main/printers/thermal.ts — a banner must be added in both paths.
    • Note OrderFlow (separate repo) handles online-order integration; this issue is the FloCafe-side ingestion surface.

    Suggested scope: CartPanel online option + platform/external-order-id inputs; external_order_id column + payload validation in order creation; "ONLINE ORDER" banner in both receipt encoders; tests. Related: none conflicting.

  2. added
    enhancement
    area:backend
    area:frontend
    on Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendarea:frontendenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions