hocam son bir istek:
her butona 1 tane tıkladığımda totalprice çalışıyor
2 şer tane basınca total price abartıyor.
hata nerde acaba

$total_price =0.0;
$total_count=0;
$toplam =[];

foreach($products as $key => $product ){

$urun_takim_fiyat = $products[$product_id_key]['a-siparis'] * $products[$product_id_key]["satis_fiyat"];
$products[$product_id_key]['total_price'] = $urun_takim_fiyat; //products diziye ekle

$total_count =$products[$product_id_key]['a-siparis'] ;
$total_price = $urun_takim_fiyat;
$toplam[] =$urun_takim_fiyat;
//$product["total_price"];

}

$sontoplam = array_sum($toplam);
echo "sepete topolam ".$sontoplam ;

$summary["total_price"]=$sontoplam;
$summary["total_count"]=$total_count;
$_SESSION["shoppingCart"]["products"] = $products;
$_SESSION["shoppingCart"]["summary"]= $summary;

//print_r($_SESSION);

return $total_count;