| {{__('Product')}} | @foreach(Session::get('comparison') as $pro) @php $product = App\Product::find($pro['proid']); @endphp @if(isset($product) && $product->status == 1)
@foreach($product->subvariants as $orivar)
@if($orivar->def == 1)
@if($price_login == 0 || Auth::check())
@php
$convert_price = 0;
$show_price = 0;
$commision_setting = App\CommissionSetting::first();
if($commision_setting->type == "flat"){
$commission_amount = $commision_setting->rate;
if($commision_setting->p_type == 'f'){
$totalprice = $orivar->products->vender_price+$orivar->price+$commission_amount;
$totalsaleprice = $orivar->products->vender_offer_price + $orivar->price + $commission_amount;
if($orivar->products->vender_offer_price == 0){
$show_price = $totalprice;
}else{
$totalsaleprice;
$convert_price = $totalsaleprice =='' ? $totalprice:$totalsaleprice;
$show_price = $totalprice;
}
}else{
$totalprice = ($orivar->products->vender_price+$orivar->price)*$commission_amount;
$totalsaleprice = ($orivar->products->vender_offer_price+$orivar->price)*$commission_amount;
$buyerprice = ($orivar->products->vender_price+$orivar->price)+($totalprice/100);
$buyersaleprice = ($orivar->products->vender_offer_price+$orivar->price)+($totalsaleprice/100);
if($orivar->products->vender_offer_price ==0){
$show_price = round($buyerprice,2);
}else{
round($buyersaleprice,2);
$convert_price = $buyersaleprice==''?$buyerprice:$buyersaleprice;
$show_price = $buyerprice;
}
}
}else{
$comm = App\Commission::where('category_id',$product->category_id)->first();
if(isset($comm)){
if($comm->type=='f'){
$price = $orivar->products->vender_price + $comm->rate + $orivar->price;
if($orivar->products->vender_offer_price != null){
$offer = $orivar->products->vender_offer_price + $comm->rate + $orivar->price;
}else{
$offer = $orivar->products->vender_offer_price;
}
if($orivar->products->vender_offer_price == 0 || $orivar->products->vender_offer_price == null){
$show_price = $price;
}else{
$convert_price = $offer;
$show_price = $price;
}
}
else{
$commission_amount = $comm->rate;
$totalprice = ($orivar->products->vender_price+$orivar->price)*$commission_amount;
$totalsaleprice = ($orivar->products->vender_offer_price+$orivar->price)*$commission_amount;
$buyerprice = ($orivar->products->vender_price+$orivar->price)+($totalprice/100);
$buyersaleprice = ($orivar->products->vender_offer_price+$orivar->price)+($totalsaleprice/100);
if($orivar->products->vender_offer_price == 0){
$show_price = round($buyerprice,2);
}else{
$convert_price = round($buyersaleprice,2);
$convert_price = $buyersaleprice==''?$buyerprice:$buyersaleprice;
$show_price = round($buyerprice,2);
}
}
}
}
$convert_price_form = $convert_price;
$show_price_form = $show_price;
$convert_price = $convert_price*$conversion_rate;
$show_price = $show_price*$conversion_rate;
@endphp
@endif
@php
$var_name_count = count($orivar['main_attr_id']);
$name = array();
$var_name;
$newarr = array();
for($i = 0; $i<$var_name_count; $i++){
$var_id =$orivar['main_attr_id'][$i];
$var_name[$i] = $orivar['main_attr_value'][$var_id];
$name[$i] = App\ProductAttributes::where('id',$var_id)->first();
}
try {
$url = url('details') . '/'. str_replace(' ','-',$product->name) .'/' . $product->id . '?' . $name[0]['attr_name'] . '=' . $var_name[0] . '&' . $name[1]['attr_name'] . '=' . $var_name[1];
} catch (\Exception $e) {
$url = url('details') . '/' .str_replace(' ','-',$product->name) .'/' . $product->id . '?' . $name[0]['attr_name'] . '=' . $var_name[0];
}
@endphp
@if(count($product->subvariants)>0)
@if(isset($orivar->variantimages['image2']))
@endif
{{ $product->name }}
@if($orivar->def == 1)
@if($price_login == 0 || Auth::check())
@php
$convert_price = 0;
$show_price = 0;
$commision_setting = App\CommissionSetting::first();
if($commision_setting->type == "flat"){
$commission_amount = $commision_setting->rate;
if($commision_setting->p_type == 'f'){
$totalprice = $orivar->products->vender_price+$orivar->price+$commission_amount;
$totalsaleprice = $orivar->products->vender_offer_price + $orivar->price + $commission_amount;
if($orivar->products->vender_offer_price == 0){
$show_price = $totalprice;
}else{
$totalsaleprice;
$convert_price = $totalsaleprice =='' ? $totalprice:$totalsaleprice;
$show_price = $totalprice;
}
}else{
$totalprice = ($orivar->products->vender_price+$orivar->price)*$commission_amount;
$totalsaleprice = ($orivar->products->vender_offer_price+$orivar->price)*$commission_amount;
$buyerprice = ($orivar->products->vender_price+$orivar->price)+($totalprice/100);
$buyersaleprice = ($orivar->products->vender_offer_price+$orivar->price)+($totalsaleprice/100);
if($orivar->products->vender_offer_price ==0){
$show_price = round($buyerprice,2);
}else{
round($buyersaleprice,2);
$convert_price = $buyersaleprice==''?$buyerprice:$buyersaleprice;
$show_price = $buyerprice;
}
}
}else{
$comm = App\Commission::where('category_id',$product->category_id)->first();
if(isset($comm)){
if($comm->type=='f'){
$price = $orivar->products->vender_price + $comm->rate + $orivar->price;
if($orivar->products->vender_offer_price != null){
$offer = $orivar->products->vender_offer_price + $comm->rate + $orivar->price;
}else{
$offer = $orivar->products->vender_offer_price;
}
if($orivar->products->vender_offer_price == 0 || $orivar->products->vender_offer_price == null){
$show_price = $price;
}else{
$convert_price = $offer;
$show_price = $price;
}
}
else{
$commission_amount = $comm->rate;
$totalprice = ($orivar->products->vender_price+$orivar->price)*$commission_amount;
$totalsaleprice = ($orivar->products->vender_offer_price+$orivar->price)*$commission_amount;
$buyerprice = ($orivar->products->vender_price+$orivar->price)+($totalprice/100);
$buyersaleprice = ($orivar->products->vender_offer_price+$orivar->price)+($totalsaleprice/100);
if($orivar->products->vender_offer_price == 0){
$show_price = round($buyerprice,2);
}else{
$convert_price = round($buyersaleprice,2);
$convert_price = $buyersaleprice==''?$buyerprice:$buyersaleprice;
$show_price = round($buyerprice,2);
}
}
}
}
$convert_price_form = $convert_price;
$show_price_form = $show_price;
$convert_price = $convert_price*$conversion_rate;
$show_price = $show_price*$conversion_rate;
@endphp
@endif
@endif
@if($price_login != 1)
@if($convert_price != 0)
{{ $convert_price }}
@php
$incartcheck = 0;
if(Auth::check()){
$incart = App\Cart::where('user_id',Auth::user()->id)->where('variant_id',$orivar->id)->first();
if (isset($incart)) {
$incartcheck = 1;
}else{
$incartcheck = 0;
}
}else{
if(!empty(Session::has('cart'))){
foreach (Session::get('cart') as $comp) {
if($orivar->id == $comp['variantid']){
$incartcheck = 1;
break;
}
}
}
}
@endphp
@if($incartcheck == 1)
@auth
{{ __('Remove From Cart')}}
@else
{{ __('Remove From Cart') }}
@endif
@else
@if($price_login != 1)
@endif
@endif
|
@endif
@endforeach
||
|---|---|---|---|
| {{__('Ratings')}} |
|
||
| {{__('Description')}} | @foreach(Session::get('comparison') as $product) @php $pro = App\Product::find($product['proid']); @endphp @if(isset($pro) && $pro->status == 1){!! $pro->des !!} | @endif @endforeach||
| {{__('Availability')}} | @foreach(Session::get('comparison') as $pro) @php $product = App\Product::find($pro['proid']); @endphp @if(isset($product) && $product->status == 1)@foreach($product->subvariants as $orivar) @if($orivar->def == 1) @if($orivar->stock > 0) {{__('In Stock')}} @else {{__('Out of Stock')}} @endif @endif @endforeach | @endif @endforeach||
| {{__('Weight')}} | @foreach(Session::get('comparison') as $product) @php $product = App\Product::find($product['proid']); @endphp @if(isset($product) && $product->status == 1)
@foreach($product->subvariants as $orivar)
@if($orivar->def == 1)
@if(isset($orivar->unitname['short_code']))
{{ $orivar->weight.$orivar->unitname['short_code'] }} @endif @endif @endforeach |
@endif
@endforeach
||
| {{__('Specification')}} | @foreach(Session::get('comparison') as $pro) @php $product = App\Product::find($pro['proid']); @endphp @if(isset($product) && $product->status == 1)
@if(count($product->specs)>0)
|
@endif
@endforeach
||
| {{__('Remove')}} | @foreach(Session::get('comparison') as $product) @php $pro = App\Product::find($product['proid']); @endphp @if(isset($pro) && $pro->status == 1)@endif @endforeach |