feat: implement discount and transport features in the quote system
- Added maximum discount settings configurable by the administrator. - Implemented discount calculations in the quote confirmation process. - Introduced transport options with associated costs, including handling for exceeding maximum piece limits. - Updated frontend to display discounts and transport information in the quote summary. - Created new database migrations for storing discount and transport settings. - Developed a new Filament page for managing global discount settings. - Enhanced email templates to include discount and transport details. - Added tests to ensure proper functionality of discounts and transport calculations.
This commit is contained in:
@@ -7,6 +7,30 @@ return [
|
||||
// URL base dell'app cliente (per link nelle email admin).
|
||||
'frontend_cliente_url' => env('APP_FRONTEND_CLIENTE_URL', 'http://localhost:5199'),
|
||||
|
||||
// URL del configuratore 3D (linkato dal menu del backoffice).
|
||||
'configuratore_url' => env('APP_CONFIGURATORE_URL', 'http://localhost:5173'),
|
||||
|
||||
// Regola base di scontistica (in %), valida per tutti i clienti salvo personalizzazione:
|
||||
// imponibile = totale parziale x (1 - 1° sconto) x (1 - 2° sconto extra).
|
||||
'sconti' => [
|
||||
'max_1' => (float) env('SCONTO_MAX_1', 50),
|
||||
'max_2' => (float) env('SCONTO_MAX_2', 10),
|
||||
],
|
||||
|
||||
// Contributo trasporto scelto al checkout, aggiunto dopo gli sconti: importo cadauno, cioè
|
||||
// moltiplicato per il numero di pezzi (10 finestre = 10 volte). Importo null = da quantificare.
|
||||
'trasporto' => [
|
||||
'zone' => [
|
||||
'campania_entro_150km' => ['etichetta' => 'Contributo trasporto Campania entro 150 km', 'importo' => 100],
|
||||
'campania_oltre_150km' => ['etichetta' => 'Contributo trasporto Campania oltre 150 km', 'importo' => 150],
|
||||
'altro' => ['etichetta' => 'Altro', 'importo' => null],
|
||||
],
|
||||
'nota_da_quantificare' => 'Per una stima dei costi di trasporto contatta Krèios Infissi.',
|
||||
// Oltre questo numero di pezzi la tariffa cadauno non vale: niente scelta, trasporto da quantificare.
|
||||
'max_pezzi' => 20,
|
||||
'etichetta_oltre_max' => 'Contributo per il trasporto da quantificare',
|
||||
],
|
||||
|
||||
// Durata (in giorni) della sessione di login del configuratore.
|
||||
'configurator_session_days' => (int) env('CONFIGURATOR_SESSION_DAYS', 30),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user