@extends('layouts.dashboard.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 ? 'checked' : '' }} data-id="{{ @$product->id }}" data-status="{{ @$product->status ? 0 : 1 }}" data-link="{{ route('admin.product.updatestatus', ['id' => @$product->id]) }}">
@endif
@include('layouts.dashboard.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: {{ $package->shipping_weight }}

@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
@csrf
{{-- @for ($i = 0; $i < 3; $i++)
Warehouse {{ $i }}
Near Creek Road Thrissur Kerala India 680551 +91 999-999-9999
@endfor --}} @php $warehouse = !empty(@$product->getavailability->warehouse) ? explode(',', @$product->getavailability->warehouse) : []; @endphp @if (!empty($product) && $product->getbusiness && count($product->getbusiness->getaddress) > 0) @foreach ($product->getbusiness->getaddress as $address)
id }} {{ in_array($address->id, $warehouse) ? 'checked' : '' }}>
{{ $address->location_name }}
{{ $address->address_1 }} {{ $address->address_2 }}
Ph: {{ $address->phone }}
Mo: {{ $address->mobile }}
@endforeach @endif
@csrf
@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
{{--
--}}
@csrf
@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('admin.users.add-address') @include('admin.products.add-package') @endsection @push('css') @endpush @push('js') @endpush