@extends('layouts.admin.master') @section('head') @endsection @section('title') Bargain Book Hut — Edit Product @endsection @section('body')
{{-- TOP BAR --}}
Catalogue› Products› Edit #{{ $booktype->id }}
← Back 📋 Duplicate

Edit Product ✏️ Editing #{{ $booktype->id }}

Updating: {{ $product->name }}

@if (session('error'))
⚠️ {{ session('error') }}
@endif @if ($errors->any())
⚠️ Cannot save duplicate — fix these:
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
⚠️ You are editing a DUPLICATE — 3 fields must be changed before saving
✕ Title ✕ Barcode ✕ ISBN
Change all three above before saving, or this will overwrite the original product's data.
ℹ️ You are editing an existing product. Only changed images will be replaced — leave image upload empty to keep existing images.
@csrf {{-- ── BASIC INFORMATION ──────────────────────────────────────────── --}}

📝 Basic Information

@error('title')
{{ $message }}
@enderror
Must be unique — system will check for duplicates
Numbers only · ISBN-13 standard (13+ digits)
@error('isbn')
{{ $message }}
@enderror
{{-- AUTHORS --}}
🔍
Type to search authors…
Search and select one or more authors.
{{-- PUBLISHER --}}
0 / 2000
{{-- ── CATEGORY & SUBCATEGORY ──────────────────────────────────────── --}}

🗂️ Category & Subcategory

Both multi-select
🔍
Loading…
Select all categories this book belongs to.
Select a category above first
Grouped by parent category. Pick as many as apply.
{{-- ── DEALS & TAGS ────────────────────────────────────────────────── --}}

🏷️ Deals & Promotional Tags

Click to toggle
free_delivery) ? 'checked' : '' }}>
Apply one or more tags. These appear as badges on product cards.
@foreach($deals as $deal) 🏷️ {{ $deal->content }} @endforeach
{{-- ── SCHEDULER ───────────────────────────────────────────────────── --}}

📅 Tag Scheduler

Schedule this book under a tag on a future date
Add future scheduled tags. Existing schedules shown below.
{{-- Existing scheduled tags from DB --}} @if(isset($scheduledTags) && $scheduledTags->count())
Existing Schedules
@foreach($scheduledTags as $st)
🏷️ {{ $st->tag_label }} {{ \Carbon\Carbon::parse($st->scheduled_date)->format('d M Y') }} {{ $st->processed ? '✓ Done' : 'Pending' }}
@endforeach
@endif
No new scheduled tags — add one below
{{-- ── PRICING & STOCK ─────────────────────────────────────────────── --}}

💰 Pricing & Stock

Book Type
Pricing
{{-- ── PRINTED PRICE with currency dropdown ──────────────────── --}}
Cover price on book
₹
Your listed price
₹
Enter price → auto % fills
%
Enter % → auto price fills
₹
Must be less than MRP
💸 Discount Breakdown
—
You Save
—
Discount %
—
Our Price
Our Price0% off MRP
—
Stock
Book Specs
{{-- ── PHYSICAL DIMENSIONS ─────────────────────────────────────── --}}
Physical Dimensions
cm
Book width / breadth
cm
Spine thickness
cm
Book height (spine length)
g
Book weight in grams (used for shipping calculation)
{{-- ── PRODUCT IMAGES ──────────────────────────────────────────────── --}}

🖼️ Product Images

Upload new to replace existing
{{-- Existing images --}}
Current Images
@if($booktype->img_path)
Front Cover Front
@endif @if($booktype->back_imgpath)
Back Cover Back
@endif @if(isset($internalImages)) @foreach($internalImages as $img)
Internal Internal
@endforeach @endif @if(!$booktype->img_path && !$booktype->back_imgpath)
No images uploaded yet
@endif
Upload New Images (replaces existing)
📸
Drop new images here to replace
1st = Front cover · 2nd = Back cover · Rest = Internal · Max 5MB each
+
{{-- ── SEO ─────────────────────────────────────────────────────────── --}}

🔍 SEO & Metadata

Recommended: 50–60 characters
0 / 160
Preview
bargainbookhutonline.com/books/{{ $booktype->slug ?? 'your-product-slug' }}
{{ $product->name }} — Bargain Book Hut
{{ $booktype->meta_description ?? 'Your meta description will appear here.' }}
{{-- /col-main --}} {{-- ── SIDEBAR ─────────────────────────────────────────────────────────── --}}

🚦 Publish Settings

Status Published
Visibility
Publish Date
Progress
Form Completion0%
← Back to List

📋 Product Summary

ID#{{ $booktype->id }}
Authors—
Categories—
Subcategories—
Deal Tags—
Discount—
Dimensions {{ $booktype->height ? $booktype->height.'×'.($booktype->breadth ?? '–').'×'.($booktype->width ?? '–').' cm' : '—' }}
Stock {{ ($booktype->stock_status ?? 'in') === 'in' ? 'In Stock' : 'Out of Stock' }}
{{-- /col-side --}}
{{-- /content --}}
✅ Action completed
@endsection