@extends('layouts.master') @section('page_title', 'View Product') @section('title', 'Product Details') @section('main_item', 'Product') @section('sub_item', 'Product Details') @section('content')

Product Details :

Product Name :{{ $product->product_name }}
Business Location : @foreach ($business_locations as $business_location) @foreach ($product_has_business_locations as $product_has_business_location) @if ($product_has_business_location->business_location_id == $business_location->id) {{ $business_location->name }} @endif @endforeach @endforeach
SKU :{{ $product->sku }}
Category : @foreach ($categories as $categorie) @if ($categorie->id == $product->category_id) {{ $categorie->category_name }} @else @endif @endforeach
Sub Category : {{-- @foreach ($sub_categories as $sub_category) @foreach ($product_has_sub_categories as $product_has_sub_category) @if ($product_has_sub_category->sub_category_id == $sub_category->id) {{ $sub_category->sub_category_name }} @endif @endforeach @endforeach --}} @foreach ($sub_categories as $sub_category) {{ in_array($sub_category->id, $product_has_sub_categories) ? '' : '' }} {{ $sub_category->sub_category_name }} @endforeach
Re-Order Level : {{ $product->reorder_level }}
@if ($product->attribute_id == null)
Purchase Price :{{ number_format($stock->unit_cost, 2) }}
Selling Price :{{ number_format($stock->unit_price, 2) }} {{--
Secound Price :{{ number_format($stock->second_price, 2) }} --}}
@else
@endif
Product Image
@if (!empty($product->image)) @else @endif
@if ($product->attribute_id == null)

Single Product

{{-- --}} {{-- --}}
Sku Unit Cost @if ($setting->select_currency_type == '1') (LKR) @else (USD) @endif select_currency_type != '0') style="display: none" @endif>Unit Cost Convert to LKR Selling Price @if ($setting->select_currency_type == '1') (LKR) @else (USD) @endif Second Price @if ($setting->select_currency_type == '1') (LKR) @else (USD) @endif Currunt Stock
{{ $product->sku }} {{ number_format($stock->unit_cost, 2) }} {{ number_format($stock->unit_price, 2) }}{{ number_format($stock->second_price, 2) }}{{ $totalStockQty }}
@else

Variable Product

{{-- --}} @php $attribute = App\Attribute::find($product->attribute_id); @endphp {{-- --}} @foreach ($child_products as $key => $child_product) @php ++$key; $attribute = App\Attribute::find($child_product->attribute_id); @endphp {{-- --}} @endforeach
Variation Variation Value Currant Stock Unit Cost @if ($setting->select_currency_type == '1') (LKR) @else (USD) @endif select_currency_type != '0') style="display: none" @endif> Unit Cost Convert to LKR @if ($setting->select_currency_type == '1') (USD) @else (LKR) @endif Selling Price @if ($setting->select_currency_type == '1') (LKR) @else (USD) @endif Second Price @if ($setting->select_currency_type == '1') (LKR) @else (USD) @endif
{{ $attribute->attribute_name }} {{ $product->attribute_value }}
{{ $attribute->attribute_name }} {{ $child_product->attribute_value }}
@endif @endsection