sepet.js: hediye çeki desteği — toplamdan 100 TL düşer
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Sepet — ürünleri toplar
|
||||
const sepet = [];
|
||||
const HEDIYE_CEKI = 100; // TL — hediye çeki bakiyesi
|
||||
|
||||
function sepeteEkle(urun, fiyat) {
|
||||
sepet.push({ urun: urun, fiyat: fiyat });
|
||||
@@ -10,5 +11,5 @@ function sepetToplami() {
|
||||
}
|
||||
|
||||
function sepetIndirimliToplam() {
|
||||
return sonFiyat(sepetToplami());
|
||||
return sonFiyat(sepetToplami()) - HEDIYE_CEKI; // çekiyi düş
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user