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
This commit is contained in:
twotalesanimation
2026-01-02 21:40:56 +02:00
parent 124ab46507
commit dd950b5aba
2 changed files with 49 additions and 4 deletions
+35 -2
View File
@@ -212,8 +212,41 @@
</div>
<div class="form-group">
<label for="shipping_address">Delivery Address</label>
<textarea id="shipping_address" name="shipping_address" required>{{ old('shipping_address') }}</textarea>
<label for="shipping_street_address">Street Address</label>
<input type="text" id="shipping_street_address" name="shipping_street_address" placeholder="e.g., 123 Main Street" value="{{ old('shipping_street_address') }}" required>
</div>
<div class="form-group">
<label for="shipping_local_area">Suburb/Local Area</label>
<input type="text" id="shipping_local_area" name="shipping_local_area" placeholder="e.g., Menlyn" value="{{ old('shipping_local_area') }}" required>
</div>
<div class="form-group">
<label for="shipping_city">City</label>
<input type="text" id="shipping_city" name="shipping_city" placeholder="e.g., Pretoria" value="{{ old('shipping_city') }}" required>
</div>
<div class="form-group">
<label for="shipping_zone">Province/Zone</label>
<input type="text" id="shipping_zone" name="shipping_zone" placeholder="e.g., Gauteng" value="{{ old('shipping_zone') }}" required>
</div>
<div class="form-group">
<label for="shipping_postcode">Postal Code</label>
<input type="text" id="shipping_postcode" name="shipping_postcode" placeholder="e.g., 0181" value="{{ old('shipping_postcode') }}" required>
</div>
<div class="form-group">
<label for="shipping_country">Country</label>
<input type="text" id="shipping_country" name="shipping_country" value="ZA" readonly>
</div>
<div class="form-group">
<label for="shipping_type">Address Type</label>
<select id="shipping_type" name="shipping_type" required>
<option value="residential" {{ old('shipping_type') === 'residential' ? 'selected' : '' }}>Residential</option>
<option value="business" {{ old('shipping_type') === 'business' ? 'selected' : '' }}>Business</option>
</select>
</div>
<div class="form-group">