Shopware plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Shopware

Display Shopware 6 revenue, order, and stock metrics as live dashboard widgets in your Filament panel.

Tags: Widget
Supported versions:
5.x 4.x 3.x
primzahldev avatar Author: primzahldev

Documentation

Shopware 6 dashboard widgets. Displays revenue, orders, stock levels and revenue trends directly inside the Filament admin panel.

#Requirements

  • PHP 8.1+
  • Laravel 10, 11 or 12
  • Filament 3, 4 or 5
  • A Shopware 6 instance with API access (integration of type "Client Credentials")

#Installation

composer require primzahl/filament-shopware

The service provider is auto-discovered — no manual registration required.

#Publish configuration

php artisan vendor:publish --tag=filament-shopware-config

#Configure environment variables

In your .env file:

PRIMZAHL_SHOPWARE_URL=https://your-shop.com
PRIMZAHL_SHOPWARE_CLIENT_ID=your-client-id
PRIMZAHL_SHOPWARE_CLIENT_SECRET=your-client-secret

Optional settings:

PRIMZAHL_SHOPWARE_CACHE_TTL=60        # cache duration in seconds (default: 60)
PRIMZAHL_SHOPWARE_LOW_STOCK=5         # low-stock alert threshold (default: 5)

#Create a Shopware 6 integration

  1. In the Shopware admin, go to Settings → System → Integrations
  2. Create a new integration
  3. Copy the Access Key and Secret Key
  4. Add them as PRIMZAHL_SHOPWARE_CLIENT_ID and PRIMZAHL_SHOPWARE_CLIENT_SECRET in your .env

#Register the plugin

In your Filament PanelProvider (e.g. app/Providers/Filament/AdminPanelProvider.php):

use Primzahl\FilamentShopwareDashboard\FilamentShopwareDashboardPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(FilamentShopwareDashboardPlugin::make());
}

#Widgets

The plugin ships with 4 dashboard widgets:

Widget Description
Revenue overview Revenue for today, 7 days and 30 days as stat cards
Orders & stock Orders today + low-stock alert (red when products fall below the threshold)
Revenue chart Line chart showing daily revenue over the last 30 days
Latest orders Table with the 10 most recent orders including customer, amount and status

#Toggle widgets individually

Each widget can be enabled or disabled via the fluent API:

FilamentShopwareDashboardPlugin::make()
    ->revenueWidget(true)      // Revenue overview (default: on)
    ->ordersWidget(true)       // Orders & stock (default: on)
    ->latestOrders(false)      // Hide latest orders
    ->revenueChart(false)      // Hide revenue chart

#Opt out of dashboard registration entirely

If you don't want the plugin to register any widgets on the default dashboard — for example because you want to place them manually (see next section) — use the master switch:

FilamentShopwareDashboardPlugin::make()
    ->registerDefaultWidgets(false);

The widget classes remain fully usable for custom placement; only the default-dashboard registration is skipped.

#Use widgets outside the default dashboard

All four widgets are regular Filament widgets (Livewire components). Beyond the default dashboard, you can place them wherever Filament renders widgets.

#On a custom Filament page

use Primzahl\FilamentShopwareDashboard\Widgets\ShopwareRevenueWidget;
use Filament\Pages\Page;

class ShopwareOverview extends Page
{
    protected function getHeaderWidgets(): array
    {
        return [
            ShopwareRevenueWidget::class,
            // add more widget classes as needed
        ];
    }
}

#On a Filament Resource page (List / View / Edit)

// e.g. app/Filament/Resources/OrderResource/Pages/ListOrders.php
protected function getHeaderWidgets(): array
{
    return [
        ShopwareRevenueWidget::class,
        ShopwareOrdersWidget::class,
    ];
}

#Inline in any Blade view inside a Filament panel

@livewire(\Primzahl\FilamentShopwareDashboard\Widgets\ShopwareRevenueWidget::class)

{{-- or with the tag syntax --}}
<livewire:primzahl.filament-shopware-dashboard.widgets.shopware-revenue-widget />

#Good to know

  • The fluent toggles (->revenueWidget(false), …) only control the default dashboard registration. The widget classes remain available for custom placement regardless of the toggles.
  • The widgets render Filament UI components, so they expect a Filament panel context (Filament styles/scripts loaded). Embedding them in standalone Laravel views outside a panel is possible via Livewire but requires you to load @filamentStyles / @filamentScripts yourself — a thin custom Filament page is usually the smoother path.
  • Polling intervals (60s for stats, 300s for the chart) are defined statically on each widget class. To use a different interval in a specific place, extend the class and override $pollingInterval.

#Configuration

The full configuration after publishing (config/filament-shopware.php):

Option Env variable Default Description
url PRIMZAHL_SHOPWARE_URL '' Base URL of the Shopware shop
client_id PRIMZAHL_SHOPWARE_CLIENT_ID '' OAuth client ID
client_secret PRIMZAHL_SHOPWARE_CLIENT_SECRET '' OAuth client secret
cache_ttl PRIMZAHL_SHOPWARE_CACHE_TTL 60 Cache duration in seconds
low_stock_threshold PRIMZAHL_SHOPWARE_LOW_STOCK 5 Threshold that triggers the low-stock alert
polling_interval 60s Auto-refresh interval for widgets
currency_symbol Currency symbol shown in the UI
currency_locale de_DE Locale used for number formatting

#Tests

./vendor/bin/pest