@if(isset($p->variant->variantimages) && file_exists(public_path().'/variantimages/thumbnails/'.$p->variant->variantimages->main_image))
@endif
|
{{$p->variant->products->name}} ({{ variantname($p->variant) }}) |
@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 = $p->variant->products->vender_price+$p->variant->price+$commission_amount;
$totalsaleprice = $p->variant->products->vender_offer_price + $p->variant->price + $commission_amount;
if($p->variant->products->vender_offer_price == 0){
$show_price = $totalprice;
}else{
$totalsaleprice;
$convert_price = $totalsaleprice =='' ? $totalprice:$totalsaleprice;
$show_price = $totalprice;
}
}else{
$totalprice = ($p->variant->products->vender_price+$p->variant->price)*$commission_amount;
$totalsaleprice = ($p->variant->products->vender_offer_price+$p->variant->price)*$commission_amount;
$buyerprice = ($p->variant->products->vender_price+$p->variant->price)+($totalprice/100);
$buyersaleprice = ($p->variant->products->vender_offer_price+$p->variant->price)+($totalsaleprice/100);
if($p->variant->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',$p->variant->products->category_id)->first();
if(isset($comm)){
if($comm->type=='f'){
$price = $p->variant->products->vender_price + $comm->rate + $p->variant->price;
if($p->variant->products->vender_offer_price != null){
$offer = $p->variant->products->vender_offer_price + $comm->rate + $p->variant->price;
}else{
$offer = $p->variant->products->vender_offer_price;
}
if($p->variant->products->vender_offer_price == 0 || $p->variant->products->vender_offer_price == null){
$show_price = $price;
}else{
$convert_price = $offer;
$show_price = $price;
}
}
else{
$commission_amount = $comm->rate;
$totalprice = ($p->variant->products->vender_price+$p->variant->price)*$commission_amount;
$totalsaleprice = ($p->variant->products->vender_offer_price+$p->variant->price)*$commission_amount;
$buyerprice = ($p->variant->products->vender_price+$p->variant->price)+($totalprice/100);
$buyersaleprice = ($p->variant->products->vender_offer_price+$p->variant->price)+($totalsaleprice/100);
if($p->variant->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);
}
}
}else{
$commission_amount = 0;
$totalprice = ($p->variant->products->vender_price+$p->variant->price)*$commission_amount;
$totalsaleprice = ($p->variant->products->vender_offer_price+$p->variant->price)*$commission_amount;
$buyerprice = ($p->variant->products->vender_price+$p->variant->price)+($totalprice/100);
$buyersaleprice = ($p->variant->products->vender_offer_price+$p->variant->price)+($totalsaleprice/100);
if($p->variant->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
@if(Session::has('currency'))
@if($convert_price == 0 || $convert_price == 'null')
{{round($show_price,2)}}
@else
{{round($convert_price,2)}}
|
@if($p->variant->stock == 0)
{{ __('Out of stock') }} | @else{{ __('In Stock') }} | @endif|||
@if($p->simple_product->thumbnail != '' && file_exists(public_path().'/images/simple_products/'.$p->simple_product->thumbnail))
@endif
|
{{ $p->simple_product->product_name }} |
@if($p->simple_product->offer_price == '')
{{round($p->simple_product->price * $conversion_rate,2)}}
@else
{{round($p->simple_product->offer_price * $conversion_rate,2)}}
|
@if($p->simple_product->stock == 0)
{{ __('Out of stock') }} | @else{{ __('In Stock') }} | @endif