@extends('layouts.front') @section('title'){{$product->meta_title ? $product->meta_title : $product->name." - ".config('app.name')}}@endsection @section('meta-tags') @if($product->meta_keywords)@endif @endsection @section('meta-tags-og') @if($product->photo)@endif @endsection @section('styles') @endsection @section('content')
@if($product)
@include('partials.front.cart-message')
@if($product->category) @endif

@if($product->photo) @else @endif
@if($product->photo) @endif @if(count($product->photos) > 0) @foreach($product->photos as $key=>$photo) @endforeach @endif

{{$product->name}}

@if($product->virtual && $product->downloadable && $product->file) @lang('Download access will be given after payment is done.') @endif
@if($product->brand) {{$product->brand->name}} @endif @if($product->category) {{$product->category->name}} @endif @if(count($product->reviews->where('approved', 1)) > 0)

{{$product->reviews->where('approved', 1)->where('rating', '!=', null)->avg('rating')}}  {{count($product->reviews->where('approved', 1)->where('rating', '!=', null))}} @lang('Ratings &') {{count($product->reviews->where('approved', 1)->where('comment', '!=', null))}} @lang('Reviews')

@endif @if($product->model)

{{$product->virtual ? __("Version:") : __("Model No.")}} {{$product->model}}

@endif
@if(config('settings.social_share_enable')) @endif
@if($product->price_with_discount() < $product->price) {{currency_format($product->price_with_discount())}}
{{currency_format($product->price)}} {{round($product->discount_percentage())}}% @lang('off')
@else @if($product->old_price && ($product->price < $product->old_price)) {{currency_format($product->price)}}
{{currency_format($product->old_price)}} {{round(100 * ($product->old_price - $product->price) / $product->old_price)}}% @lang('off')
@else {{currency_format($product->price)}} @endif @endif
@if($product->in_stock < 1)

@lang('Out of Stock!')

@elseif($product->in_stock < 4)

@lang('Only') {{$product->in_stock}} @lang('left in Stock!')

@else

@lang('In Stock')

@endif @if($product->in_stock > 0)
{!! Form::open(['method'=>'patch', 'route'=>['front.cart.add', $product->id], 'id'=>'cart-form']) !!}
{!! Form::label('quantity', __('Quantity:') ) !!} {!! Form::number('quantity', 1, ['class'=>'form-control', 'step'=>'1', 'min'=>'1', 'max'=>$product->qty_per_order]) !!}
{!! Form::submit(__('Add To Cart'), ['class'=>'btn btn-success', 'name'=>'submit_button']) !!}
{!! Form::close() !!}
@endif @if(Auth::check()) @if(!$product->favouritedBy(Auth::user()))
@lang('Add to Wishlist')
@else
@lang('This item is in your') @lang('Wishlist')
@endif @endif @if($product->vendor)
@endif
{{--
{!! DNS1D::getBarcodeHTML($product->barcode, "C128A") !!}
--}} @include('partials.front.description-reviews') @include('partials.front.related-products')
@endif
@endsection @section('scripts') @include('includes.reviews-submit-script') @include('includes.reviews-pagination-script') @include('includes.cart-submit-script') @endsection