diff --git a/src/lib/components/ProductDescriptions/CommaFour.svelte b/src/lib/components/ProductDescriptions/CommaFour.svelte index e41ec461..121b0846 100644 --- a/src/lib/components/ProductDescriptions/CommaFour.svelte +++ b/src/lib/components/ProductDescriptions/CommaFour.svelte @@ -11,7 +11,7 @@ import MoneyBackGuaranteeIcon from "$lib/icons/features/money-back-guarantee.svg?raw"; import WarrantyIcon from "$lib/icons/features/warranty.svg?raw"; - import { FOUR_PRICE, FOUR_SALE, FOUR_STRIKETHROUGH_PRICE, FOUR_TRADE_IN_CREDIT, NO_HARNESS_DISCOUNT } from '$lib/constants/prices.js'; + import { FOUR_PRICE, FOUR_SALE, FOUR_STRIKETHROUGH_PRICE, FOUR_TRADE_IN_CREDIT, NO_HARNESS_DISCOUNT, affirmMonthly } from '$lib/constants/prices.js'; import { NO_HARNESS_OPTION } from '$lib/constants/vehicles.js'; @@ -61,6 +61,9 @@ $: priceDueToday = showDiscount ? FOUR_PRICE - NO_HARNESS_DISCOUNT : FOUR_PRICE; $: priceAfterTradeIn = tradeInChecked ? priceDueToday - FOUR_TRADE_IN_CREDIT : priceDueToday; + // Affirm finances what's charged today — the trade-in credit lands after we receive the device + $: affirmPrice = affirmMonthly(priceDueToday); + $: additionalProductIds = (() => { const ids = []; if (selectedHarness && selectedHarness !== NO_HARNESS_OPTION) { @@ -142,6 +145,16 @@ +
+ or ${affirmPrice}/mo with Affirm. + + Prequalify now + +
Free rush shipping {#if tradeInChecked && FOUR_TRADE_IN_CREDIT > 0} @@ -244,6 +257,10 @@ border-bottom: 1px solid rgba(0, 0, 0, 0.15); } + .financing { + text-wrap: pretty; + } + .badges { display: flex; flex-wrap: wrap; diff --git a/src/lib/constants/prices.js b/src/lib/constants/prices.js index c67736b9..47c832ef 100644 --- a/src/lib/constants/prices.js +++ b/src/lib/constants/prices.js @@ -8,3 +8,16 @@ export const FOUR_STRIKETHROUGH_PRICE = null; export const FOUR_PRICE = 999; export const FOUR_TRADE_IN_CREDIT = 250; export const NO_HARNESS_DISCOUNT = 50; + +// Affirm's longest term, which is the one we advertise since it's the lowest monthly. +// Verified against affirm.com's own calculator at $699/$749/$949/$999 — same term and +// rate across the range, so the monthly scales with the price. +export const AFFIRM_APR = 0.15; +export const AFFIRM_TERM_MONTHS = 12; + +// Standard amortized payment. Rounded up, so we never advertise less than what Affirm charges. +export function affirmMonthly(price) { + const monthlyRate = AFFIRM_APR / 12; + const payment = price * monthlyRate / (1 - Math.pow(1 + monthlyRate, -AFFIRM_TERM_MONTHS)); + return Math.ceil(payment); +} diff --git a/src/routes/shop/comma-four/+page.svelte b/src/routes/shop/comma-four/+page.svelte index 1f0e14fe..a54e3868 100644 --- a/src/routes/shop/comma-four/+page.svelte +++ b/src/routes/shop/comma-four/+page.svelte @@ -306,6 +306,12 @@ International shipping is a $30 flat rate; customs/duties/taxes are between you and your country. Please see FAQ for more information.

+ Affirm +

+ Your rate will be based on credit, and is subject to an eligibility check. + Payment options through Affirm are provided by these lending partners: affirm.com/lenders. + Options depend on your purchase amount, and a down payment may be required. +

Warranty

1-year limited warranty against hardware defects. Extend it with commacare. Open and repair the comma four at your own risk.