Skip to content

Conversation

@duncanmcclean
Copy link
Owner

@duncanmcclean duncanmcclean commented Dec 30, 2025

This pull request adds various Dashboard widgets, for things like Total Revenue, New Customers, Recent Orders, etc. Cargo will configure a few key widgets during the installation process.

CleanShot 2025-12-30 at 20 08 13

Available Widgets

// config/statamic/cp.php

'widgets' => [
    ['type' => 'total_sales', 'width' => 25],
    ['type' => 'total_revenue', 'width' => 25],
    ['type' => 'new_customers', 'width' => 25],
    ['type' => 'returning_customers', 'width' => 25],
    ['type' => 'refunded_orders', 'width' => 25],
    ['type' => 'recent_orders', 'width' => 50, 'limit' => 10],
    ['type' => 'low_stock_products', 'width' => 50, 'limit' => 5],
],

Note

I also wanted to build widgets for "Top Customers" and "Top Products" but they proved difficult to achieve from a query perspective.

At least... without a lot of if flat file, do this query and filter on the collection. if eloquent, do this.. I still want to add them at some point but I need some more time to think about the right approach.

Migration

Cargo will remove orders_chart and top_customers widgets from your cp.php config during the migration process to avoid running into errors.


Closes #46
Related: #37

@duncanmcclean duncanmcclean marked this pull request as ready for review December 30, 2025 20:08
@duncanmcclean duncanmcclean merged commit 2d326ec into main Dec 30, 2025
3 of 13 checks passed
@duncanmcclean duncanmcclean deleted the widgets branch December 30, 2025 20:11
@github-actions
Copy link

Released as part of v1.0.0-alpha.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simple Commerce to Cargo migration: No migration for widgets

2 participants