Skip to content

Commit

Permalink
Remove volume discount from slider
Browse files Browse the repository at this point in the history
  • Loading branch information
“yndira-flowforge” committed Sep 12, 2024
1 parent a7e2c06 commit 25b9b8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pricing/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,13 @@ hubspot:
const discount = ((tempSliderValue - stepSize) / stepSize) * 0.01;
let discountedPriceMonthly = (basePrice * (1 - discount)) / 12;
let regularPriceMonthly = basePrice / 12;
const [intValue, decValue] = discountedPriceMonthly.toFixed(2).split(".");
const [intValue, decValue] = regularPriceMonthly.toFixed(2).split(".");
priceIntElement.textContent = intValue;
priceDecElement.textContent = decValue;
const totalMonthlyPrice = discountedPriceMonthly * tempSliderValue;
const totalMonthlyPrice = regularPriceMonthly * tempSliderValue;
priceNoteElement.innerHTML = `/instance a month <br>Billed monthly at <span class="font-semibold">$${totalMonthlyPrice.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span><br \\>`;
})
Expand Down

0 comments on commit 25b9b8d

Please sign in to comment.