@extends('layouts.seller.app') @php $images = ''; $assignedCategory = []; $assignedType = []; $assignedApplication = []; $assignedIndustry = []; if (!empty($product)) { $images = @$product->getimages ? @$product->getimages->groupby('section') : ''; $assignedCategory = !empty(@$product->assignedCategory()) ? @$product->assignedCategory()->pluck('category_id')->toArray() : []; $assignedCas = !empty(@$product->assignedCas()) ? @$product->assignedCas()->pluck('cas_id')->toArray() : []; $assignedType = !empty(@$product->assignedType()) ? @$product->assignedType()->pluck('product_type_id')->toArray() : []; $assignedApplication = !empty(@$product->assignedApplication()) ? @$product->assignedApplication()->pluck('application_id')->toArray() : []; $assignedIndustry = !empty(@$product->assignedIndustry()) ? @$product->assignedIndustry()->pluck('industry_id')->toArray() : []; } @endphp @section('content')

{{ !empty(@$product->id) ? 'Edit' : 'Add' }} Product @if (!empty(@$product->id)) - {{ @$product->name }} {{ @$product->product_sku }} @endif

{{ !empty(@$product->id) ? 'Edit this ' : 'Add a' }} product.

@if (@$product->id)
Enable
status == 1 && $product->draft == 1 ? 'checked' : '' }} data-id="{{ $product->uuid }}" data-status="{{ $product->status == 1 && $product->draft == 1 ? 0 : 1 }}" data-link="{{ route('seller.product.updatestatus', ['id' => $product->uuid]) }}">
@endif
@include('layouts.seller.flash')
@csrf
{{--
--}}
@php $ptags = !empty(@$product->product_tag) ? explode(',', @$product->product_tag) : ''; @endphp
Packaging
@if (!empty($product) && @$product->getpackage->count()) @php $pk=0; @endphp @foreach ($product->getpackage as $package)

Type: {{ ucfirst($package->packaging_type) ?: '--' }}

@php $ad = !empty($package->shipping_length) ? $package->shipping_length . 'x' : ''; $ad .= !empty($package->shipping_width) ? $package->shipping_width . 'x' : ''; $ad .= !empty($package->shipping_height) ? $package->shipping_height . 'x' : ''; @endphp

Size: {{ trim($ad, 'x') }} {{ $package->measurement_units == 'metric' ? '(cm)' : '(inch)' }}

Shipping Weight: {{ is_numeric($package->shipping_weight) ? number_format((float) $package->shipping_weight, 2) . ' ' . ($package->measurement_units == 'metric' ? 'Kg' : 'Lb') : $package->shipping_weight }}

Price: ${{ number_format($package->price, 2) }}

@php $pk++; @endphp @endforeach @else
Add Your Packaging

You can add multiple packaging of your product

Packaging
@endif
@csrf

Please include all attributes that distinguishes this product from other products with the same name

@php $o=0; @endphp @if (!empty($product) && @$product->getoptions->count()) @foreach ($product->getoptions as $options)
@if ($o < 1) @endif
@if ($o < 1) @endif
@if ($o < 1) @endif
@if ($o == 0)
@endif @if ($o > 0) @endif
@php $o++; @endphp @endforeach @else
@endif
@php $galleries = !empty(@$product->getimages) ? @$product->getimages ->whereNull('deleted_at') ->whereIn('section', ['mainimage', 'gallery']) ->sortBy('order_number') : ''; $documents = !empty(@$product->getimages) ? @$product->getimages->whereNull('deleted_at')->where('section', 'document') : ''; @endphp
Upload Product Images
@if (!empty($galleries) && count($galleries) > 0)
@foreach ($galleries as $key => $gallery)
{{-- --}}
@endforeach
@else
No images uploaded, Click Here to upload product images
@endif
{{--
Recommended size: 500 x 500 | Supported File types - PNG, JPG
--}}
@csrf
@if (!empty($documents))
@php $extArr = [ 'pdf' => 'pdf', 'doc' => 'word', 'docx' => 'word', 'xls' => 'excel', 'xlsx' => 'excel', 'ppt' => 'ppt', 'pptx' => 'ppt', 'txt' => 'text', 'rtf' => 'text', ]; $extA = [ 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', ]; @endphp @foreach ($documents as $document) @endforeach
@endif
Supported File types - PDF
@include('seller.users.add-address') @include('seller.products.add-package')
@endsection @push('css') @endpush @push('js') @endpush