@extends('admin.layouts.master') @section('title', 'Edit Product') @section('css') @endsection @section('content')

Edit Product ({{ ucwords($product->name) }})

@csrf
@if ($errors->has('name'))

{{ $errors->first('name') }}

@endif
@if ($errors->has('brand_id'))

{{ $errors->first('brand_id') }}

@endif
@if ($errors->has('unit'))

{{ $errors->first('unit') }}

@endif
@error('label_id')

{{ $message }}

@enderror
@if ($errors->has('cost_price'))

{{ $errors->first('cost_price') }}

@endif
@if ($errors->has('weight'))

{{ $errors->first('price') }}

@endif
@if ($errors->has('off_price'))

{{ $errors->first('off_price') }}

@endif
{{-- maximum_purchase_quantity --}}
@error('qrcode')

{{ $message }}

@enderror
@if ($errors->has('minimum_purchase_quantity'))

{{ $errors->first('minimum_purchase_quantity') }}

@endif
{{-- maximum_purchase_quantity --}}
@if ($errors->has('maximum_purchase_quantity'))

{{ $errors->first('maximum_purchase_quantity') }}

@endif
@php $selected_ = old('is_refundable') ?? $product->is_refundable; @endphp
@if ($errors->has('is_refundable'))

{{ $errors->first('is_refundable') }}

@endif
@if ($errors->has('sku'))

{{ $errors->first('sku') }}

@endif
@if ($errors->has('warehouse_no'))

{{ $errors->first('warehouse_no') }}

@endif
@if ($errors->has('weight'))

{{ $errors->first('weight') }}

@endif
@if ($errors->has('quantity'))

{{ $errors->first('quantity') }}

@endif
@error('discount')

{{ $message }}

@enderror
@error('discount_type')

{{ $message }}

@enderror
@error('discount_start_date')

{{ $message }}

@enderror
@error('discount_end_date')

{{ $message }}

@enderror
Product Description Section
{{--

this is dummy description

--}} @error('short_description')

{{ $message }}

@enderror
{{--

this is dummy description

--}} @error('long_description')

{{ $message }}

@enderror
show_purchase_note) checked @endif id="show_purchase_note" name="show_purchase_note">
@if ($errors->has('show_purchase_note'))

{{ $errors->first('show_purchase_note') }}

@endif
@error('purchase_note')

{{ $message }}

@enderror
Product Gallery
Thumbnail

Add Product thumbnail Image.

@error('thumbnail_image')

{{ $message }}

@enderror
Product Gallery

Add Product Gallery Images.

{{--
Drop files here or click to upload.
  • Product-Image
     

--}} @error('product_images')

{{ $message }}

@enderror
Wholesale Price
@php $selected = old('is_wholesale') ?? $product->is_wholesale; @endphp
@if ($errors->has('is_wholesale'))

{{ $errors->first('is_wholesale') }}

@endif
@php $oldMinQuantity = old('min_quantity', []); $oldMaxQuantity = old('max_quantity', []); $oldPricePerUnit = old('price_per_unit', []); $product_wholesale_prices = $product ->wholesalePrices() ->where('user_id', null) ->get(); $count = max(count($oldMinQuantity), count($oldMaxQuantity), count($oldPricePerUnit), count($product_wholesale_prices)); @endphp @for ($i = 0; $i < $count; $i++)
@endfor
Product Attributes
@php $oldTitle = old('title', []); $oldValue = old('value', []); $count = max(count($oldTitle), count($oldValue), count($product->productAttributes)); @endphp @for ($i = 0; $i < $count; $i++)
@endfor
Publish
@error('status')

{{ $message }}

@enderror
@error('visibility')

{{ $message }}

@enderror
Product Tags
@php if (old('tags')) { $tags = old('tags'); } else { $tags = $product->tags->pluck('tag')->toArray(); $tags = implode(',', $tags); } @endphp @error('tags')

{{ $message }}

@enderror
Specification
@if ($product->pdf_specification) Download @endif @error('pdf_specification')

{{ $message }}

@enderror
@error('specification')

{{ $message }}

@enderror
Product External Info
@error('external_link')

{{ $message }}

@enderror
@error('external_link_button_name')

{{ $message }}

@enderror
Video Provider
@error('video_provider')

{{ $message }}

@enderror
@error('video_url')

{{ $message }}

@enderror
Meta Data
@error('meta_title')

{{ $message }}

@enderror
@error('meta_keywords')

{{ $message }}

@enderror
Meta Image
@if ($product->meta_image) @else @endif
@error('thumbnail_image')

{{ $message }}

@enderror
{{--
@error('meta_image')

{{ $message }}

@enderror
--}}
@error('meta_description')

{{ $message }}

@enderror
@endsection @section('js') @endsection