Hataya Bir Bakarmısnız veya Başka Bir Basit Siteme Entegre Edebileceğim Bir Sepet Uygulaması Önerirmisiniz...
-------------------------------------------
Benim Bulduğum Script...
Index of /sepet
Turk-PHP.com Türkiye'nin Bir Numaralı Programcılık Sitesi...
sepet.php
<?php // //sepet.php:ANA Dosya.
//require 'site_kut.inc.php';
//Oturumu kaydet.
session_register('sepet');
//Sepeti baslat...
if (!isset($sepet[urun_sayisi])) { $sepet = array("urun_sayisi" => 0, "urunler" =>
array()); } //Site kutuphanesi doyasinda yazdigimiz UrunleriYukle ()
fonksiyonunu cagir.
//Boylece butun urunler dizimiz icerisine yuklensin...
UrunleriYukle(); ?>
<html> <head> <title> Serkan'in Oyuncakci Dukkani </title> </head>
<body>
<h1>Serkan'in Oyuncakci Dukkanina Hosgeldiniz :)</h1>
<?php if ($sepet[urun_sayisi]) { //sepetin icinde gosterilebilcek bir urun varsa,
?> <h2>Sepetinizdeki Urunler:</h2> <br> <table border="2" cellpadding="5"
cellspacing="2"> <tr> <th> Urun Adi </th> <th> Kisa Aciklama </th>
<th> Fiyat
</th> <th> Miktar </th> <th> </th> </tr> <?php //Sepeti
icindeki
urunleri donguye sok.
//Boylece her defasinda bir urunu ekrana yazdirarak //Sepetin icinde urun
kalmayincaya kadar,ekrana urunleri satir satir yazdir.
foreach ($sepet[urunler] as $i => $urun) { $urun_id = $urun[0]; $miktar =
$urun[1];
$toplam += $miktar * (double)$urun_listesi[$urun_id][fiyat]; ?>
<tr> <td> <?php echo $urun_listesi[$urun_id][isim]; ?> </td>
<td> <?php echo $urun_listesi[$urun_id][aciklama]; ?> </td> <td> <?php
echo
$urun_listesi[$urun_id][fiyat]; ?> </td> <td> <form action="miktar_degistir.php"
method="GET"> <input type="hidden" name="id" value="<?php echo $i; ?>">
<input type="text" size="3" name="miktar" value="<?php echo $miktar; ?>">
</td> <td> <input type="submit" value="Miktari Degistir"> </form>
</td> </tr>
<?php } ?> <tr> <td colspan="2"> Toplam Hesap Tutari : </td> <td
colspan="2"> <?php echo $toplam; ?> TL </td> </tr> </table> <BR>
<BR>
<?php } ?>
<h2> ..:: Serkan'in Oyuncakci Dukkani ::..</h2> <BR>
Online magazamizdan alabileceginiz oyuncaklarimiz:
<table border="2" cellpadding="5" cellspacing="2"> <tr> <th> Urun Ismi
</th>
<th> Urun Aciklamasi </th> <th> Urun Fiyati </th> <th> </th>
</tr>
<?php //Butun urunleri listele foreach ($urun_listesi as $urun_id => $oge) { ?>
<tr> <td> <?php echo $oge[isim]; ?> </td> <td> <?php echo
$oge[aciklama];
?> </td> <td> <?php echo $oge[fiyat]; ?> </td> <td> <a
href="sepete_at.php?id=<?php echo $urun_id; ?>"> Bu urunu sepetime ekle.
</a> </td> </tr> <?php } ?> </table>Sanırım Bu Benim Ana Dosyam Ancak Buna Girdiğimde Şöyle Bir Hata Alıyorum..Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\sepet\sepet.php on line 1212.Satır
fonksiyonunu cagir.indirirseniz daha iyi anlarsınız sanırım...
Index of /sepet
www.sinanaksu.org/sepet.zip Benim Hazırladığım Şeklin Tamamı Burda
Bakarsanız Çok Sevinirim...
Şimdidien Teşekkürler...