diff --git a/packages/admin/config/customers.php b/packages/admin/config/customers.php index 0a2892a178..1f024d80b1 100644 --- a/packages/admin/config/customers.php +++ b/packages/admin/config/customers.php @@ -1,6 +1,7 @@ [], + 'impersonate' => null, + ]; diff --git a/packages/admin/config/database.php b/packages/admin/config/database.php index 2a778cdf09..9cd291a500 100644 --- a/packages/admin/config/database.php +++ b/packages/admin/config/database.php @@ -1,6 +1,7 @@ false, + ]; diff --git a/packages/admin/config/products.php b/packages/admin/config/products.php index 2914ff2146..bef5c1b44f 100644 --- a/packages/admin/config/products.php +++ b/packages/admin/config/products.php @@ -1,6 +1,7 @@ true, 'unique' => true, ], + 'gtin' => [ 'required' => false, 'unique' => false, ], + 'mpn' => [ 'required' => false, 'unique' => false, ], + 'ean' => [ 'required' => false, 'unique' => false, ], + ]; diff --git a/packages/admin/config/storefront.php b/packages/admin/config/storefront.php index 342205bf82..92ddfc2dd0 100644 --- a/packages/admin/config/storefront.php +++ b/packages/admin/config/storefront.php @@ -1,6 +1,7 @@ [ - \Lunar\Models\Product::class => null, + Lunar\Models\Product::class => null, ], + ]; diff --git a/packages/admin/config/system.php b/packages/admin/config/system.php index 73f25c6780..a4fac6de05 100644 --- a/packages/admin/config/system.php +++ b/packages/admin/config/system.php @@ -1,9 +1,13 @@ true, + 'path' => 'hub', + 'middleware' => [ 'web', ], + ]; diff --git a/packages/core/config/cart.php b/packages/core/config/cart.php index e93dcc5182..4ea1b3dbd8 100644 --- a/packages/core/config/cart.php +++ b/packages/core/config/cart.php @@ -1,6 +1,9 @@ Lunar\Actions\Carts\GenerateFingerprint::class, + 'fingerprint_generator' => GenerateFingerprint::class, /* |-------------------------------------------------------------------------- @@ -59,24 +62,21 @@ */ 'pipelines' => [ /* - |-------------------------------------------------------------------------- - | Run these pipelines when the cart is calculating. - |-------------------------------------------------------------------------- - */ + * Run these pipelines when the cart is calculating. + */ 'cart' => [ - \Lunar\Pipelines\Cart\CalculateLines::class, - \Lunar\Pipelines\Cart\ApplyShipping::class, - \Lunar\Pipelines\Cart\ApplyDiscounts::class, - \Lunar\Pipelines\Cart\CalculateTax::class, - \Lunar\Pipelines\Cart\Calculate::class, + Lunar\Pipelines\Cart\CalculateLines::class, + Lunar\Pipelines\Cart\ApplyShipping::class, + Lunar\Pipelines\Cart\ApplyDiscounts::class, + Lunar\Pipelines\Cart\CalculateTax::class, + Lunar\Pipelines\Cart\Calculate::class, ], + /* - |-------------------------------------------------------------------------- - | Run these pipelines when the cart lines are being calculated. - |-------------------------------------------------------------------------- - */ + * Run these pipelines when the cart lines are being calculated. + */ 'cart_lines' => [ - \Lunar\Pipelines\CartLine\GetUnitPrice::class, + Lunar\Pipelines\CartLine\GetUnitPrice::class, ], ], @@ -90,12 +90,12 @@ | */ 'actions' => [ - 'add_to_cart' => \Lunar\Actions\Carts\AddOrUpdatePurchasable::class, - 'update_cart_line' => \Lunar\Actions\Carts\UpdateCartLine::class, - 'remove_from_cart' => \Lunar\Actions\Carts\RemovePurchasable::class, - 'add_address' => \Lunar\Actions\Carts\AddAddress::class, - 'set_shipping_option' => \Lunar\Actions\Carts\SetShippingOption::class, - 'order_create' => \Lunar\Actions\Carts\CreateOrder::class, + 'add_to_cart' => Lunar\Actions\Carts\AddOrUpdatePurchasable::class, + 'update_cart_line' => Lunar\Actions\Carts\UpdateCartLine::class, + 'remove_from_cart' => Lunar\Actions\Carts\RemovePurchasable::class, + 'add_address' => Lunar\Actions\Carts\AddAddress::class, + 'set_shipping_option' => Lunar\Actions\Carts\SetShippingOption::class, + 'order_create' => Lunar\Actions\Carts\CreateOrder::class, ], /* @@ -108,19 +108,25 @@ | */ 'validators' => [ + 'add_to_cart' => [ - \Lunar\Validation\CartLine\CartLineQuantity::class, + Lunar\Validation\CartLine\CartLineQuantity::class, ], + 'update_cart_line' => [ - \Lunar\Validation\CartLine\CartLineQuantity::class, + Lunar\Validation\CartLine\CartLineQuantity::class, ], + 'remove_from_cart' => [], + 'set_shipping_option' => [ - \Lunar\Validation\Cart\ShippingOptionValidator::class, + Lunar\Validation\Cart\ShippingOptionValidator::class, ], + 'order_create' => [ - \Lunar\Validation\Cart\ValidateCartForOrderCreation::class, + Lunar\Validation\Cart\ValidateCartForOrderCreation::class, ], + ], /* diff --git a/packages/core/config/database.php b/packages/core/config/database.php index 3accbda1cb..0a0351d130 100644 --- a/packages/core/config/database.php +++ b/packages/core/config/database.php @@ -1,6 +1,7 @@ '', 'table_prefix' => 'lunar_', @@ -26,4 +27,5 @@ | */ 'disable_migrations' => false, + ]; diff --git a/packages/core/config/discounts.php b/packages/core/config/discounts.php index bcb3863b7f..55bac048db 100644 --- a/packages/core/config/discounts.php +++ b/packages/core/config/discounts.php @@ -1,14 +1,18 @@ \Lunar\Base\Validation\CouponValidator::class, + |-------------------------------------------------------------------------- + | Coupon Validator + |-------------------------------------------------------------------------- + | + | Here you can specify the class which validates coupons. This is useful if you + | want to have custom logic for what determines whether a coupon can be used. + | + */ + 'coupon_validator' => CouponValidator::class, + ]; diff --git a/packages/core/config/media.php b/packages/core/config/media.php index fcbb7371ce..b3a03bce82 100644 --- a/packages/core/config/media.php +++ b/packages/core/config/media.php @@ -3,11 +3,14 @@ use Lunar\Base\StandardMediaConversions; return [ + 'conversions' => [ StandardMediaConversions::class, ], + 'fallback' => [ 'url' => env('FALLBACK_IMAGE_URL', null), 'path' => env('FALLBACK_IMAGE_PATH', null), ], + ]; diff --git a/packages/core/config/orders.php b/packages/core/config/orders.php index afc9ec5a3a..8ae0149f45 100644 --- a/packages/core/config/orders.php +++ b/packages/core/config/orders.php @@ -3,6 +3,7 @@ use Lunar\Base\OrderReferenceGenerator; return [ + /* |-------------------------------------------------------------------------- | Order Reference Generator @@ -13,6 +14,7 @@ | */ 'reference_generator' => OrderReferenceGenerator::class, + /* |-------------------------------------------------------------------------- | Draft Status @@ -24,31 +26,38 @@ | */ 'draft_status' => 'awaiting-payment', + 'statuses' => [ + 'awaiting-payment' => [ 'label' => 'Awaiting Payment', 'color' => '#848a8c', 'mailers' => [], 'notifications' => [], ], + 'payment-offline' => [ 'label' => 'Payment Offline', 'color' => '#0A81D7', 'mailers' => [], 'notifications' => [], ], + 'payment-received' => [ 'label' => 'Payment Received', 'color' => '#6a67ce', 'mailers' => [], 'notifications' => [], ], + 'dispatched' => [ 'label' => 'Dispatched', 'mailers' => [], 'notifications' => [], ], + ], + /* |-------------------------------------------------------------------------- | Order Pipelines @@ -71,4 +80,5 @@ Lunar\Pipelines\Order\Creation\MapDiscountBreakdown::class, ], ], + ]; diff --git a/packages/core/config/payments.php b/packages/core/config/payments.php index 2f73d3a83f..b3d728a841 100644 --- a/packages/core/config/payments.php +++ b/packages/core/config/payments.php @@ -1,6 +1,7 @@ env('PAYMENTS_TYPE', 'cash-in-hand'), 'types' => [ @@ -9,4 +10,5 @@ 'authorized' => 'payment-offline', ], ], + ]; diff --git a/packages/core/config/pricing.php b/packages/core/config/pricing.php index c35a28572b..6a2a99c09a 100644 --- a/packages/core/config/pricing.php +++ b/packages/core/config/pricing.php @@ -1,6 +1,9 @@ \Lunar\Pricing\DefaultPriceFormatter::class, + 'formatter' => DefaultPriceFormatter::class, /* |-------------------------------------------------------------------------- @@ -32,6 +35,7 @@ | */ 'pipelines' => [ - // + // App\Pipelines\Pricing\Example::class, ], + ]; diff --git a/packages/core/config/search.php b/packages/core/config/search.php index 5678ac64be..d9741b02f5 100644 --- a/packages/core/config/search.php +++ b/packages/core/config/search.php @@ -1,6 +1,7 @@ [ - // These models are required by the system, do not change them. - \Lunar\Models\Brand::class, - \Lunar\Models\Collection::class, - \Lunar\Models\Customer::class, - \Lunar\Models\Order::class, - \Lunar\Models\Product::class, - \Lunar\Models\ProductOption::class, - // Below you can add your own models for indexing + /* + * These models are required by the system, do not change them. + */ + Lunar\Models\Brand::class, + Lunar\Models\Collection::class, + Lunar\Models\Customer::class, + Lunar\Models\Order::class, + Lunar\Models\Product::class, + Lunar\Models\ProductOption::class, + + /* + * Below you can add your own models for indexing... + */ + // App\Models\Example::class, ], + /* |-------------------------------------------------------------------------- | Search engine mapping @@ -31,17 +39,18 @@ | */ 'engine_map' => [ - // \Lunar\Models\Product::class => 'algolia', - // \Lunar\Models\Order::class => 'meilisearch', - // \Lunar\Models\Collection::class => 'meilisearch', + // Lunar\Models\Product::class => 'algolia', + // Lunar\Models\Order::class => 'meilisearch', + // Lunar\Models\Collection::class => 'meilisearch', ], 'indexers' => [ - \Lunar\Models\Brand::class => \Lunar\Search\BrandIndexer::class, - \Lunar\Models\Collection::class => \Lunar\Search\CollectionIndexer::class, - \Lunar\Models\Customer::class => \Lunar\Search\CustomerIndexer::class, - \Lunar\Models\Order::class => \Lunar\Search\OrderIndexer::class, - \Lunar\Models\Product::class => \Lunar\Search\ProductIndexer::class, - \Lunar\Models\ProductOption::class => \Lunar\Search\ProductOptionIndexer::class, + Lunar\Models\Brand::class => Lunar\Search\BrandIndexer::class, + Lunar\Models\Collection::class => Lunar\Search\CollectionIndexer::class, + Lunar\Models\Customer::class => Lunar\Search\CustomerIndexer::class, + Lunar\Models\Order::class => Lunar\Search\OrderIndexer::class, + Lunar\Models\Product::class => Lunar\Search\ProductIndexer::class, + Lunar\Models\ProductOption::class => Lunar\Search\ProductOptionIndexer::class, ], + ]; diff --git a/packages/core/config/shipping.php b/packages/core/config/shipping.php index 5a6b3f5073..951ff8bc46 100644 --- a/packages/core/config/shipping.php +++ b/packages/core/config/shipping.php @@ -1,6 +1,7 @@ [ + 'length' => [ + 'm' => [ 'format' => '1,0.000 m', 'unit' => 1.00, ], + 'mm' => [ 'format' => '1,0.000 mm', 'unit' => 1000, ], + 'cm' => [ 'format' => '1!0 cm', 'unit' => 100, ], + 'ft' => [ 'format' => '1,0.00 ft.', 'unit' => 3.28084, ], + 'in' => [ 'format' => '1,0.00 in.', 'unit' => 39.3701, ], + ], + 'area' => [ + 'sqm' => [ 'format' => '1,00.00 sq m', 'unit' => 1, ], + ], + 'weight' => [ + 'kg' => [ 'format' => '1,0.00 kg', 'unit' => 1.00, ], + 'g' => [ 'format' => '1,0.00 g', 'unit' => 1000.00, ], + 'lbs' => [ 'format' => '1,0.00 lbs', 'unit' => 2.20462, ], + ], + 'volume' => [ + 'l' => [ 'format' => '1,00.00l', 'unit' => 1, ], + 'ml' => [ 'format' => '1,00.000ml', 'unit' => 1000, ], + 'gal' => [ 'format' => '1,00.000gal', 'unit' => 0.264172, ], + 'floz' => [ 'format' => '1,00.000Fl oz.', 'unit' => 33.814, ], + ], + ], + ]; diff --git a/packages/core/config/taxes.php b/packages/core/config/taxes.php index 45ccbc1050..a1a8ecd7f8 100644 --- a/packages/core/config/taxes.php +++ b/packages/core/config/taxes.php @@ -1,6 +1,7 @@ 'system', + ]; diff --git a/packages/core/config/urls.php b/packages/core/config/urls.php index 16a0fd2df0..94f732b7f9 100644 --- a/packages/core/config/urls.php +++ b/packages/core/config/urls.php @@ -1,25 +1,29 @@ true, /* - |-------------------------------------------------------------------------- - | URL Generator - |-------------------------------------------------------------------------- - | - | Here you can specify a class to automatically generate URLs for models which - | implement the `HasUrls` trait. If left null no generation will happen. - | You are free to use your own generator, or you can use the one that - | ships with Lunar, which by default will use the name attribute. - | - */ - 'generator' => Lunar\Generators\UrlGenerator::class, + |-------------------------------------------------------------------------- + | URL Generator + |-------------------------------------------------------------------------- + | + | Here you can specify a class to automatically generate URLs for models which + | implement the `HasUrls` trait. If left null no generation will happen. + | You are free to use your own generator, or you can use the one that + | ships with Lunar, which by default will use the name attribute. + | + */ + 'generator' => UrlGenerator::class, + ];