Informations principales
- Titre: {{ data_get($data, 'title', '—') }}
- Catégorie: {{ $categoryName }}
- Prix:
{{ $price ? number_format($price, 0, ',', ' ') . ' FCFA' : '—' }}
@if (!in_array($mainCatId, [37, 73, 97, 114, 122, 140, 166], true))
- Livraison gratuite:
{{ data_get($data, 'freeDelivery') ? 'Oui' : 'Non' }}
@endif
@if (!is_null($mainCatId) && $mainCatId !== 166)
- Négociable:
{{ data_get($data, 'negotiable') ? 'Oui' : 'Non' }}
@endif
@if (count($custumsFields) > 0)
Informations supplémentaires
@foreach ($custumsFields as $field)
@php
$cfId = data_get($field, 'id');
$cfKey = $cfId ? 'cf_' . $cfId : null;
$type = data_get($field, 'type');
$exists = $cfKey ? !is_null(data_get($data, $cfKey)) : false;
$rawValue = $exists ? data_get($data, $cfKey) : null;
@endphp
@if ($exists)
-
{{ data_get($field, 'name', '') }}:
@php
// Appliquer le formatage avec unités
$formattedValue = formatCustomFieldValue($field, $rawValue);
@endphp
{!! $formattedValue !!}
@endif
@endforeach
@endif
Contact
- Nom: {{ data_get($data, 'contact_name', '—') }}
- Email: {{ data_get($data, 'email', '—') }}
- Téléphone: {{ data_get($data, 'phone', '—') }}
- Ville: {{ $cityName }}
Description
{!! data_get($data, 'description', '') !!}
@php
$tagsStr = trim((string) data_get($data, 'tags', ''));
$tags = $tagsStr !== '' ? explode(',', $tagsStr) : [];
@endphp
@if (!empty($tags))
Tags
@foreach($tags as $tag)
{{ trim($tag) }}
@endforeach
@endif