sepet.js: hediye çeki desteği — toplamdan 100 TL düşer

This commit is contained in:
masaustu-codex
2026-07-30 03:46:27 +03:00
parent 970145bd4e
commit eef16b2a2a
+2 -1
View File
@@ -1,5 +1,6 @@
// Sepet — ürünleri toplar // Sepet — ürünleri toplar
const sepet = []; const sepet = [];
const HEDIYE_CEKI = 100; // TL — hediye çeki bakiyesi
function sepeteEkle(urun, fiyat) { function sepeteEkle(urun, fiyat) {
sepet.push({ urun: urun, fiyat: fiyat }); sepet.push({ urun: urun, fiyat: fiyat });
@@ -10,5 +11,5 @@ function sepetToplami() {
} }
function sepetIndirimliToplam() { function sepetIndirimliToplam() {
return sonFiyat(sepetToplami()); return sonFiyat(sepetToplami()) - HEDIYE_CEKI; // çekiyi düş
} }