@extends('admin::layouts.master') @push('styles') @endpush @section('content') @php $productCountry = \Modules\Product\Entities\ProductCountry::where('product_id', $product->id) ->where('country_id', auth('admin')->user()->country_id) ->first(); @endphp

{{ $product->name }} {{ translate('Back') }}

{{ renderStarRating($product->activeProductRatings->avg('rating')) }} ({{ decimal_price($product->activeProductRatings->avg('rating')) }})
{{ $product->activeProductRatings->count() }}
{{ translate('Reviews') }}
{{ \Modules\Customer\Entities\WishList::where('product_country_id', $productCountry->id)->count() }}
{{ translate('Wishlist') }}
{{ \Modules\Orders\Entities\OrderItems::whereHas('order', function ($q) { $q->whereIn('order_status', ['delivered', 'confirmed', 'packed', 'shipped']); })->where('product_country_id', $productCountry->id)->sum('quantity') }}
{{ translate('Sold') }}
{{ \Modules\Customer\Entities\Cart::where('product_country_id', $productCountry->id)->count() }}
{{ translate('In Cart') }}
@if ($productCountry->is_variant == 0)
{{ $productCountry->number_of_stock }}
@else
{{ $productCountry->productVariations->sum('number_of_stock') }}
@endif
{{ translate('Stock') }}
{{ \Modules\Orders\Entities\OrderItems::whereHas('order', function ($q) { $q->where('order_status', 'pending'); })->where('product_country_id', $productCountry->id)->sum('quantity') }}
{{ translate('Pooling Stock') }}
@if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ \Modules\Orders\Entities\OrderItems::whereHas('order', function ($q) { $q->whereIn('order_status', ['delivered', 'confirmed', 'packed', 'shipped']); })->where('product_country_id', $productCountry->id)->sum('subtotal') }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Total sold') }}
@if ($productCountry->discount > 0)
{{ $productCountry->discount }}% {{ translate('Off') }}
{{ date('d/m/Y H:i:s', strtotime($productCountry->discount_start_date)) }} - {{ date('d/m/Y H:i:s', strtotime($productCountry->discount_end_date)) }}
@endif {{-- @if (check_product_is_in_stock_log($product->id)) @endif --}}
{{ translate('Status') }}: @if ($productCountry->status) {{ translate('Published') }} @else {{ translate('Draft') }} @endif
{{ translate('Category') }}: @foreach ($product->categories as $category) {{ $category->getTranslation('name', 'en', true) }} @endforeach
{{ translate('Tags') }}: @foreach (\Modules\SearchTag\Entities\SearchTag::whereIn('id', $product->tags->pluck('id'))->get() as $tags) {{ $tags->name }} @endforeach
{{ translate('Minimum Purchase Qty ') }}: {{ $productCountry->min_qty }}
{{ translate('Maximum Purchase Qty ') }}: {{ $productCountry->max_qty != 0 ? $productCountry->max_qty : 'Unlimited' }}
@if ($productCountry->activeProductTax->count())
{{ translate('VAT & Tax') }}
@foreach ($productCountry->activeProductTax as $tax)
{{ $tax->percentage }}%
@endforeach
@endif
{{ translate('Product Data') }}
MRP: {{ $productCountry->mrp_price }}     Selling MRP: {{ $productCountry->offer_price }} {{ $productCountry->number_of_stock }} {{ $productCountry->sku }}
@php $bundles = \Modules\Product\Entities\ProductBundle::with(['itemProductCountry', 'itemProductCountry.product', 'variations', 'variations.productVariation', 'variations.productVariation.combinations', 'variations.productVariation.combinations.attributeValue']) ->where('product_country_id', $productCountry->id) ->get(); @endphp @foreach ($bundles as $key => $bundle) @if ($bundle->variations->count()) @foreach ($bundle->variations as $variation) @endforeach @else @endif @endforeach
{{ $bundle->itemProductCountry->product->name }}
@foreach ($variation->productVariation->combinations as $combination) {{ $combination->attributeValue->attribute_value . ' ' }} @endforeach
{{ $variation->item_quantity }}
{{ $bundle->itemProductCountry->product->name }}
Single
{{ $bundle->item_quantity }}
{{ translate('Product Description') }}
{!! $product->description !!}
{{ translate('Gallery') }}
@endsection @section('modal') @include('admin::modals.delete_modal') @include('admin::modals.duplicate_modal') @include('admin::modals.confirm_modal') @endsection @section('script') @include('product::scripts.index_scripts') @endsection