@php if (auth()->user() != null) { $user_id = Auth::user()->id; $cart = \App\Models\Cart::where('user_id', $user_id)->get(); } else { $temp_user_id = Session()->get('temp_user_id'); if ($temp_user_id) { $cart = \App\Models\Cart::where('temp_user_id', $temp_user_id)->get(); } } $cart_added = array(); if(isset($cart) && count($cart) > 0){ $cart_added = $cart->pluck('product_id')->toArray(); } @endphp
@if(discount_in_percentage($product) > 0)
-{{discount_in_percentage($product)}}%
@endif
@if ($product->wholesale_product)
{{ translate('Wholesale') }}
@endif
@if($product->auction_product == 0)
{{ translate('Add to Cart') }}