Files
opensem/resources/views/Shop/Customers/partials/address_item.blade.php
Valentin Lab 2771a09a90 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.
2026-02-09 09:51:39 +01:00

26 lines
1.0 KiB
PHP

<div class="row mt-3 address-row" data-address-id="{{ $address['id'] }}">
<div class="col-1">
@php
$inputName = $inputName ?? (isset($prefix) && $prefix ? $prefix.'[address_id]' : 'address_id');
$currentValue = $selected ?? null;
@endphp
<x-form.radios.icheck name="{{ $inputName }}" val="{{ $address['id'] }}"
:value="$currentValue" id="address_{{ $address['id'] }}" />
</div>
<div class="col-10">
@if ($with_name ?? false)
{{ $address['name'] ?? '' }}<br />
@endif
{{ $address['address'] }}<br />
@if (! empty($address['address2']))
{{ $address['address2'] }}<br />
@endif
{{ $address['zipcode'] }} {{ $address['city'] }}
</div>
<div class="col-1 text-right">
<a class="text-danger" href="{{ route('Shop.Customers.delete_address', ['id' => $address['id']]) }}">
<i class="fa fa-trash" data-id="{{ $address['id'] }}"></i>
</a>
</div>
</div>