:: **Zploit** v1.0 | Current Path: **/home/ev8tmzj0ufzx/public_html/iconcreative.in/app/helper/**
:: Editing File: cartdata.php
<?php function cart_data(){ if(Auth::check()){ $s_id=Auth::id(); } else { $s_id=Session::getId(); } $cart_data=DB::table('cart') ->join('productmaster', 'cart.product_id', '=', 'productmaster.id') ->select('cart.*', 'productmaster.front_image', 'productmaster.slug') ->where('cart.user_id',$s_id) ->get(); return $cart_data; } function wish_data(){ if(Auth::check()){ // $wish_data=DB::table('wishlist')->where('user_id',Auth::id())->count(); $wish_data = DB::table('wishlist') ->join('productmaster', 'wishlist.product_id', '=', 'productmaster.id') ->select('wishlist.*', 'productmaster.mrp') ->where('wishlist.user_id',Auth::id()) ->count(); return $wish_data; } else { return 0; } } function getCategoryName($id=0){ /*if($id>0){ $cate_data=DB::table('category')->where('id',$id)->first(); }else{ $cate_data=DB::table('category')->where('id','!=','')->get(); }*/ $cate_data=DB::table('category')->where('id',$id)->first(); return $cate_data; } function getsubcatecogyCount($pro_id=0,$subcategory_id){ $total = DB::table('productmaster')->where('subcategory_id',$subcategory_id)->count(); return $total??0; } ?>