From: Max Value <greenwoodw50@gmail.com> Date: Thu, 24 Apr 2025 11:19:25 +0000 (+0100) Subject: EMERGENCY COMMIT X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;ds=inline;p=shopping-channel EMERGENCY COMMIT --- diff --git a/data.db b/data.db index 16ab433..48a31ba 100755 Binary files a/data.db and b/data.db differ diff --git a/templates/gfx.html b/templates/gfx.html index 7efa9aa..5878c58 100644 --- a/templates/gfx.html +++ b/templates/gfx.html @@ -760,7 +760,7 @@ function update() { side.classList.add("showExtra"); for (let d = 0; d < 4; d++) { - if (discount[d] <= 0.99) { + if (discountHard[d] <= 0.99) { badgeContainer[d].classList.add("show"); } else { badgeContainer[d].classList.remove("show"); @@ -800,7 +800,7 @@ function update() { document.getElementById("description").innerHTML = item.description.replaceAll(rep, "█"); // calculate the price sting with the pre/postfix - let price = item.origional_price * discount.reduce((a, b)=> a*b, 1); + let price = item.origional_price * discountHard.reduce((a, b)=> a*b, 1); if (data.bool_rounding) { price = Math.round(price * 100) / 100; } @@ -816,14 +816,14 @@ function update() { // set discount, pricing and ez pay document.getElementById("currentPrice").innerHTML = `<em>Now only:</em> ${priceString}`.replaceAll(rep, "█"); document.getElementById("monthlyPrice").innerHTML = `12 monthly payments of <b>${ezString}</b>`.replaceAll(rep, "█"); - document.getElementById("badge1Text").innerHTML = `${Math.round((1 - discount[0]) * 100)}% OFF`.replaceAll(rep, "█"); - document.getElementById("badge2Text").innerHTML = `ONLY ${Math.round((discount[1]) * 100)}%`.replaceAll(rep, "█"); - document.getElementById("badge3Text").innerHTML = `${Math.round((1 - discount[2]) * 100)}% REMOVED`.replaceAll(rep, "█"); - document.getElementById("badge4Text").innerHTML = `10 FOR ${String(Math.round(discount[3] * 10)).replaceAll(rep, "█")}<br><span style='font-size: 0.7em;'>WHAT?</span>`; + document.getElementById("badge1Text").innerHTML = `${Math.round((1 - discountHard[0]) * 100)}% OFF`.replaceAll(rep, "█"); + document.getElementById("badge2Text").innerHTML = `ONLY ${Math.round((discountHard[1]) * 100)}%`.replaceAll(rep, "█"); + document.getElementById("badge3Text").innerHTML = `${Math.round((1 - discountHard[2]) * 100)}% REMOVED`.replaceAll(rep, "█"); + document.getElementById("badge4Text").innerHTML = `10 FOR ${String(Math.round(discountHard[3] * 10)).replaceAll(rep, "█")}<br><span style='font-size: 0.7em;'>WHAT?</span>`; document.getElementById("stock").innerHTML = `${item.stock_count} units`.replaceAll(rep, "█"); document.getElementById("sold").innerHTML = `${Math.round(item.stock_count * (1 - (data.percent_remaining / 100)))} units`.replaceAll(rep, "█"); - if (discount.reduce((a, b)=> a*b, 1) <= 0.99) { + if (discountHard.reduce((a, b)=> a*b, 1) <= 0.99) { let origionalPrice = Math.round(item.origional_price); if (item.prefix) {origionalString = `${item.currency}${origionalPrice}`} else {origionalString = `${origionalPrice}${item.currency}`};