@extends('admin.layouts.main') @php $page_name = 'Product Image Mapping'; @endphp @section('style') @endsection @section('content')

Map Editable Areas on Product

Test Preview
@if (!empty($map_imgs))
@foreach ($map_imgs as $map_img)
Mapped Image
@foreach ($map_img['x'] as $index => $x)
@endforeach
@endforeach
@else

No previously mapped images found.

@endif
@csrf {{-- Image Selection (5 Images) --}}
@for ($i = 1; $i <= 5; $i++) @php $imagePath = !empty($product["product_image_$i"]) ? url('images/products/' . $product["product_image_$i"]) : null; @endphp @if ($imagePath) @endif @endfor
{{-- Product Image (Editable Area inside) --}}
@if (isset($map_imgs[0]['x'])) @foreach ($map_imgs[0]['x'] as $k => $item)

@endforeach @endif @if (isset($map_imgs[0]['image_path']) && $map_imgs[0]['image_path'] != '') Product Image @else Product Image @endif
{{-- Options --}}
@include('components.alertmodal', [ 'modal_id' => 'deleteMappedImageModal', 'form_id' => 'deleteMappedImageForm', 'action' => route('admin.deletemappedimage'), 'modal_title' => 'Confirm Deletion', 'input_id' => 'deleteMappedImageId', 'modal_mess' => 'Are you sure you want to delete this mapped image?', 'button_type' => 'submit', 'button_id' => 'confirmDeleteMappedImageButton', ]) @endsection @section('script') @endsection