Resource & Grids

Refund Plugin exposes a set of Sylius Resources and Admin grids you can extend.

Resource

You can find registered resources by running the command:

bin/console sylius:debug:resource | grep sylius_refund

Extending the Credit Memo grid

As with Invoicing, the memo listing is a regular Sylius Grid—fully extensible.

  1. Find the grid name your app is using:

bin/console debug:config sylius_grid | less

Search for a grid that contains memo columns (number, issued at, order number, total). Grid names commonly follow a pattern like sylius_refund_*credit_memo*.

  1. Add/adjust columns (example):

# config/packages/sylius_grid.yaml
sylius_grid:
  grids:
    sylius_refund_credit_memo:        # use the actual name from debug:config
      fields:
        number:
          type: string
          label: 'sylius_refund.ui.credit_memo_number'
        issuedAt:
          type: datetime
          label: 'sylius_refund.ui.issued_at'
        orderNumber:
          type: string
          label: 'sylius.ui.order'
        total:
          type: string
          label: 'sylius.ui.total'

Order page integration

The Refunds UI is plugged into the Admin Order view (and Shop order detail) via Twig Hooks/components in 2.x—so you can move/replace those blocks without touching controllers. See our dedicated Twig Hooks & PDF templates page for hook names and overriding tips. (GitHub)

Verify your changes

  1. Grids bin/console debug:config sylius_grid | less

  2. Admin UI

    • Open Admin → Credit Memos: check your new columns/filters/actions.

    • Open Admin → Orders → [Order] → Refunds: ensure refunding still generates a memo + payment.

Last updated

Was this helpful?