2026-07-03 13:46:54 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Lunar\Base\OrderReferenceGenerator;
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Order Reference Format
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Specify the format for the order reference generator to use.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
'reference_format' => [
|
|
|
|
|
/**
|
|
|
|
|
* Optional prefix for the order reference
|
|
|
|
|
*/
|
|
|
|
|
'prefix' => null,
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* STR_PAD_LEFT: 00001965
|
|
|
|
|
* STR_PAD_RIGHT: 19650000
|
|
|
|
|
* STR_PAD_BOTH: 00196500
|
|
|
|
|
*/
|
|
|
|
|
'padding_direction' => STR_PAD_LEFT,
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 00001965
|
|
|
|
|
* AAAA1965
|
|
|
|
|
*/
|
|
|
|
|
'padding_character' => '0',
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* If the length specified below is smaller than the length
|
|
|
|
|
* of the Order ID, then no padding will take place.
|
|
|
|
|
*/
|
|
|
|
|
'length' => 8,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Order Reference Generator
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Here you can specify how you want your order references to be generated
|
|
|
|
|
| when you create an order from a cart.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
'reference_generator' => OrderReferenceGenerator::class,
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Draft Status
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| When a draft order is created from a cart, we need an initial status for
|
|
|
|
|
| the order that's created. Define that here, it can be anything that would
|
|
|
|
|
| make sense for the store you're building.
|
|
|
|
|
|
|
|
|
|
|
*/
|
2026-09-14 20:17:34 +03:00
|
|
|
'draft_status' => 'awaiting_payment',
|
2026-07-03 13:46:54 +00:00
|
|
|
|
2026-09-14 20:17:34 +03:00
|
|
|
// Two sequences — carrier and store-pickup — see Modules\Core\Order\
|
|
|
|
|
// Services\OrderStatusFlow, the single source of truth for which
|
|
|
|
|
// transitions are actually offered from a given status. Payment
|
|
|
|
|
// timing (prepaid vs. cash-on-delivery) does not affect this
|
|
|
|
|
// sequence at all — see Order::paid/paid_at instead, an entirely
|
|
|
|
|
// independent field with no status value of its own.
|
|
|
|
|
//
|
|
|
|
|
// 'favourite' controls whether a status gets its own tab in the order
|
|
|
|
|
// list topbar (Lunar\Admin\...\ListOrders::getDefaultTabs()) — set
|
|
|
|
|
// only on the main-journey statuses so the topbar isn't cluttered
|
|
|
|
|
// with every branch/exception value; every status (favourite or not)
|
|
|
|
|
// remains reachable via the table's own status filter/search.
|
2026-07-03 13:46:54 +00:00
|
|
|
'statuses' => [
|
|
|
|
|
|
2026-09-14 20:17:34 +03:00
|
|
|
'awaiting_payment' => [
|
2026-07-03 13:46:54 +00:00
|
|
|
'label' => 'Awaiting Payment',
|
|
|
|
|
'color' => '#848a8c',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
2026-09-14 20:17:34 +03:00
|
|
|
'processing' => [
|
|
|
|
|
'label' => 'Processing',
|
2026-07-03 13:46:54 +00:00
|
|
|
'color' => '#0A81D7',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
2026-09-14 20:17:34 +03:00
|
|
|
'ready_for_dispatch' => [
|
|
|
|
|
'label' => 'Ready for Dispatch',
|
|
|
|
|
'color' => '#c98a2e',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'ready_for_pickup' => [
|
|
|
|
|
'label' => 'Ready for Pickup',
|
|
|
|
|
'color' => '#c98a2e',
|
2026-07-03 13:46:54 +00:00
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'dispatched' => [
|
|
|
|
|
'label' => 'Dispatched',
|
2026-09-14 20:17:34 +03:00
|
|
|
'color' => '#0A81D7',
|
2026-07-03 13:46:54 +00:00
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
2026-09-14 20:17:34 +03:00
|
|
|
'delivery_failed' => [
|
|
|
|
|
'label' => 'Delivery Failed',
|
|
|
|
|
'color' => '#c0392b',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => false,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'picked_up' => [
|
|
|
|
|
'label' => 'Picked Up',
|
|
|
|
|
'color' => '#3f7a5c',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
// The parcel arriving and the return window opening are the same
|
|
|
|
|
// moment — one status value covers both.
|
|
|
|
|
'delivered' => [
|
|
|
|
|
'label' => 'Delivered',
|
|
|
|
|
'color' => '#c98a2e',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'completed' => [
|
|
|
|
|
'label' => 'Completed',
|
|
|
|
|
'color' => '#3f7a5c',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => true,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'return_requested' => [
|
|
|
|
|
'label' => 'Return Requested',
|
|
|
|
|
'color' => '#c98a2e',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => false,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'returned' => [
|
|
|
|
|
'label' => 'Returned',
|
|
|
|
|
'color' => '#c0392b',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => false,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'partially_refunded' => [
|
|
|
|
|
'label' => 'Partially Refunded',
|
|
|
|
|
'color' => '#c98a2e',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => false,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'refunded' => [
|
|
|
|
|
'label' => 'Refunded',
|
|
|
|
|
'color' => '#c0392b',
|
|
|
|
|
'mailers' => [],
|
|
|
|
|
'notifications' => [],
|
|
|
|
|
'favourite' => false,
|
|
|
|
|
],
|
|
|
|
|
|
2026-07-03 13:46:54 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Order Pipelines
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Define which pipelines should be run throughout an order's lifecycle.
|
|
|
|
|
| The default ones provided should suit most needs, however you are
|
|
|
|
|
| free to add your own as you see fit.
|
|
|
|
|
|
|
|
|
|
|
| Each pipeline class will be run from top to bottom.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
'pipelines' => [
|
|
|
|
|
'creation' => [
|
|
|
|
|
Lunar\Pipelines\Order\Creation\FillOrderFromCart::class,
|
|
|
|
|
Lunar\Pipelines\Order\Creation\CreateOrderLines::class,
|
|
|
|
|
Lunar\Pipelines\Order\Creation\CreateOrderAddresses::class,
|
|
|
|
|
Lunar\Pipelines\Order\Creation\CreateShippingLine::class,
|
|
|
|
|
Lunar\Pipelines\Order\Creation\CleanUpOrderLines::class,
|
|
|
|
|
Lunar\Pipelines\Order\Creation\MapDiscountBreakdown::class,
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
];
|