chg: use rich address partial in checkout with add/delete support

Replaces the simple address radio list in the checkout page with the
richer ``Shop.Customers.partials.addresses`` partial already used on
the profile edit page.  Customers can now choose among existing
addresses, add a new one on-the-fly, or delete an address directly
from the checkout flow.
This commit is contained in:
Valentin Lab
2026-02-09 09:51:39 +01:00
parent 4f3ab05757
commit 2771a09a90
5 changed files with 33 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
<div class="row mt-3 address-row" data-address-id="{{ $address['id'] }}">
<div class="col-1">
@php
$inputName = isset($prefix) && $prefix ? $prefix.'[address_id]' : 'address_id';
$inputName = $inputName ?? (isset($prefix) && $prefix ? $prefix.'[address_id]' : 'address_id');
$currentValue = $selected ?? null;
@endphp
<x-form.radios.icheck name="{{ $inputName }}" val="{{ $address['id'] }}"