Add plugin cards and columns to orders
Return contributor objects from getAdminOrderContributors():
public array function getAdminOrderContributors() { return [new netseller_plugin_example_hello.services.order_contributor()];}Your CFC can implement either or both callbacks. Each returns an array; return [] when the contribution is not relevant or the current user must not see it. Protect any action route separately.
Order detail card
Section titled “Order detail card”buildAdminOrderDetailCardContributions(context) receives context.datasource and context.order. Return cards with these fields:
| Field | Type | Meaning |
|---|---|---|
id |
string | Required stable identifier. |
title, description |
string | Required display text; translate before returning. |
sortOrder |
number | Optional display order. |
metaText |
string | Optional secondary text. |
action |
struct | Optional action definition below. |
An action contains required label, routeName and method (GET or POST), optional routeParams (struct) and buttonStyle (primary or outline-primary).
{ 'id' = "example.hello.order", 'sortOrder' = 100, 'title' = "Hello", 'description' = "Open the plugin settings.", 'action' = { 'label' = "Open", 'routeName' = "plugin.example.hello.index", 'routeParams' = {}, 'method' = "GET", 'buttonStyle' = "outline-primary" }, 'metaText' = ""}The shared renderer builds the URL and markup. For POST actions it supplies CSRF and disables duplicate submissions while navigating. Return data, not custom card HTML.
Order-list column
Section titled “Order-list column”buildAdminOrderListColumnContributions(context) receives context.datasource and context.orders. Return a column with required id and label, optional sortOrder, and cells, a struct keyed by order ID.
{ 'id' = "example.hello.status", 'label' = "Hello", 'sortOrder' = 100, 'cells' = { '123' = { 'icon' = "check", 'color' = "success", 'tooltip' = "Exported", 'routeName' = "plugin.example.hello.index", 'routeParams' = {} } }}The ID 123 is illustrative: build entries from the supplied orders and your plugin’s own mappings. Missing cells are empty. Use primary, success or secondary for cell colour. Omit a route for a non-clickable state.
The bexio integration uses these two surfaces for export actions and export status. Read order contents through the public snapshot service and store external IDs in plugin-owned tables.