@extends('twill::layouts.free') @section('customPageContent') @php $filterBar = fn (string $scope) => view('admin.partials.product-bulk-filters', [ 'scope' => $scope, 'categories' => $categories, 'brands' => $brands, ])->render(); // Lookup data for the page script (ids as strings, to compare with select values). $filterData = [ 'series' => $series->map(fn ($s) => [ 'id' => (string) $s->id, 'name' => (string) $s->title, 'cat' => (string) $s->product_category_id, 'brand' => (string) $s->partner_brand_id, ])->values(), 'types' => $types->map(fn ($t) => [ 'id' => (string) $t->id, 'name' => (string) $t->title, 'series' => (string) $t->product_series_id, ])->values(), 'products' => $products->map(fn ($p) => [ 'id' => (string) $p->id, 'name' => (string) $p->title, 'cat' => (string) $p->product_category_id, 'brand' => (string) $p->productSeries?->partner_brand_id, 'series' => (string) $p->product_series_id, 'type' => (string) $p->product_type_id, ])->values(), ]; @endphp

Bulk edit products

Copy images, files or text from one product to many. Set the image once on a source product (upload it there as usual), then choose which items and text fields to copy and which products receive them. The chosen items on the target products are replaced.

@if (session('bulk_result'))

✓ {{ session('bulk_result') }}

@endif @if ($errors->any())

⚠ {{ $errors->first() }}

@endif
@csrf

1. Copy from (source product)

{!! $filterBar('source') !!}

2. What to copy

@foreach ($mediaRoles as $role => $label) @endforeach @foreach ($fileRoles as $role => $label) @endforeach

Text (copied in every language)

@foreach ($textFields as $field => $label) @endforeach

3. Apply to ({{ $products->count() }} shown)

{!! $filterBar('target') !!} @foreach ($products as $product) @endforeach
Product Series Status
id, old('targets', [])))> {{ $product->title }} {{ $product->series_name }} {{ $product->published ? 'Published' : 'Draft' }}

← Back to products

@push('extra_js') {{-- Outside the Vue root (#app): Vue drops @endpush @endsection