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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user