Skip to content

Instantly share code, notes, and snippets.

@semihkeskindev
Last active April 2, 2024 20:15
Show Gist options
  • Save semihkeskindev/371f776cb70134821b46ead9a62f69f4 to your computer and use it in GitHub Desktop.
Save semihkeskindev/371f776cb70134821b46ead9a62f69f4 to your computer and use it in GitHub Desktop.
Trendyol Toplam Harcama Hesaplayıcı
// Trendyol'da yaptığınız toplam harcamayı hesaplar.
// https://www.trendyol.com/hesabim/siparislerim sayfasına gidin.
// Tüm siparişleri listeleyin.
// Console'da function'ı çağırın. => calculateTotalPrice();
function calculateTotalPrice() {
let totalPrice = 0;
let prices = document.querySelectorAll('#orders-container .order .order-header .order-header-info:nth-child(4) b').forEach(function(item, index) {
totalPrice += parseFloat(item.innerText.replace(',', '.'));
});
return totalPrice; // example: 1614.7700000000002
}
@veyselsk
Copy link

veyselsk commented Apr 2, 2024

trendyol toplam harcamam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment