if(Cookie::get('user_id')) { $user_id = Cookie::get('user_id'); $query_count = DB::query('SELECT item_id FROM carts WHERE cookie_user_id = "'. $user_id .'"')->execute(); $query2 = DB::query('SELECT sum(item_price) FROM carts WHERE cookie_user_id = "'. $user_id .'"')->execute()->as_array(); $data = $query_count->as_array(); $datasum = $query2; $data_count = $query_count->count(); }else { $unique_id = Str::random('sha1'); Cookie::set('user_id',$unique_id,time()+3600,'/','abba.com'); $datasum = ''; $data_count = 0; }In fuel/app/views/welcome/cart.php remove this code:
<?php foreach($datacart as $datacart1 => $key); ?>
It looks like you're new here. If you want to get involved, click one of these buttons!