<?php

$sizeofcart = '';
$totalpriceofcart = 0;
$cartdatasetdataz = array();
$cartdataset = array();
 



  $currentbasket = $queries -> gettempfactors("EXEC gettempfactors @p1= ".$_SESSION['uzi']." , @p2 = ".$_SESSION['pzi'].", @ucid = ".$_SESSION['ucid']);
       
       if(is_array($currentbasket) && sizeof($currentbasket)>0){
           
           $currentbasket = $currentbasket[0]['getfactors'];
           
               if(is_array($currentbasket) && sizeof($currentbasket) > 0){
                   
                       $sizeofcart = sizeof($currentbasket);
                           
                           
                   for($i=0;$i<sizeof($currentbasket);$i++){
                       
            
                       $currentz = $currentbasket[$i];
                       
                       $currentz_img = $currentz['pic_path'];
                       $currentz_name = $currentz['nam'];
                       $currentz_count = $currentz['numb'];
                       $currentz_id = $currentz['cod_kala'];
                       $currentz_price = $currentz['price'];
                       $currentz_fj = $currentz['f_j'];
           
 
                       
                       $totalpriceofcart += floatval($currentz_count) * floatval($currentz_price);
                       
 
 
                         $cartdatasetdataz = array('img' => $currentz_img,"name" => $currentz_name,"count" => $currentz_count, "id" => $currentz_id,"price" => $currentz_price,"f_j" => $currentz_fj);
                        

                         array_push($cartdataset,$cartdatasetdataz);
            
                   }
        
        
               }
       
       }
?>