From dd950b5aba9231b05fcf9bc6a4c1bfafe932212f Mon Sep 17 00:00:00 2001 From: twotalesanimation <80506065+twotalesanimation@users.noreply.github.com> Date: Fri, 2 Jan 2026 21:40:56 +0200 Subject: [PATCH] feat: Update checkout form to collect detailed address fields - Replace single shipping_address textarea with individual components - Collect: street_address, local_area, city, zone, postcode, country, type - Update checkout validation to require all address components - Update OrderController::process to save individual address fields - Fields are now captured per ShipLogic API requirements - Note: CustomOrder checkout address collection to be implemented later --- app/Http/Controllers/OrderController.php | 16 ++++++++-- resources/views/checkout.blade.php | 37 ++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 55317ff..14f90f3 100644 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -116,7 +116,13 @@ class OrderController extends Controller 'customer_name' => 'required|string|max:255', 'customer_email' => 'required|email', 'customer_phone' => 'required|string|max:20', - 'shipping_address' => 'required|string|max:500', + 'shipping_street_address' => 'required|string|max:255', + 'shipping_local_area' => 'required|string|max:255', + 'shipping_city' => 'required|string|max:255', + 'shipping_zone' => 'required|string|max:255', + 'shipping_postcode' => 'required|string|max:20', + 'shipping_country' => 'required|string|max:2', + 'shipping_type' => 'required|in:residential,business', 'notes' => 'nullable|string|max:500' ]); @@ -219,7 +225,13 @@ class OrderController extends Controller 'customer_name' => $request->input('customer_name'), 'customer_email' => $request->input('customer_email'), 'customer_phone' => $request->input('customer_phone'), - 'shipping_address' => $request->input('shipping_address'), + 'shipping_street_address' => $request->input('shipping_street_address'), + 'shipping_local_area' => $request->input('shipping_local_area'), + 'shipping_city' => $request->input('shipping_city'), + 'shipping_zone' => $request->input('shipping_zone'), + 'shipping_postcode' => $request->input('shipping_postcode'), + 'shipping_country' => $request->input('shipping_country'), + 'shipping_type' => $request->input('shipping_type'), ]; if ($request->filled('notes')) { diff --git a/resources/views/checkout.blade.php b/resources/views/checkout.blade.php index 9f67110..95aadb8 100644 --- a/resources/views/checkout.blade.php +++ b/resources/views/checkout.blade.php @@ -212,8 +212,41 @@
- - + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +