From c577a84fe44ca4eccbbc3df24298e50b3526d010 Mon Sep 17 00:00:00 2001 From: jrphilo Date: Fri, 12 Jul 2024 09:43:33 +0200 Subject: [PATCH] feat: dynamic USPs Signed-off-by: jrphilo --- components/product/special-offer.tsx | 40 ++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/components/product/special-offer.tsx b/components/product/special-offer.tsx index 5bc8bc933..536937cf1 100644 --- a/components/product/special-offer.tsx +++ b/components/product/special-offer.tsx @@ -7,23 +7,41 @@ import { UsersIcon } from '@heroicons/react/24/outline'; +const { STORE_PREFIX } = process.env; + +const storeConfig = { + 'reman-transmission': { + shippingTitle: 'Flat Rate Shipping', + shippingText: 'We offer a flat $299 shipping fee to commercial addresses', + warrantyTitle: 'Unbeatable Warranty', + warrantyText: 'Up to 5 years with unlimited miles' + }, + + default: { + shippingTitle: 'Free Shipping', + shippingText: 'We offer free shipping to commercial addresses', + warrantyTitle: 'Standard Warranty', + warrantyText: 'Up to 3 years with unlimited miles' + } +}; + +const config = storeConfig[STORE_PREFIX] || storeConfig.default; + const SpecialOffer = () => { return (
- +
- Flat Rate Shipping - - We offer a flat $299 shipping fee to commercial addresses - + {config.shippingTitle} + {config.shippingText}
Best Price Guarantee - + We will match or beat any competitor's pricing
@@ -31,8 +49,8 @@ const SpecialOffer = () => {
- Unbeatable Warranty - Up to 5 years with unlimited miles + {config.warrantyTitle} + {config.warrantyText}
@@ -40,7 +58,7 @@ const SpecialOffer = () => {
Excellent Support - + End-to-end, expert care from our customer service team
@@ -50,7 +68,7 @@ const SpecialOffer = () => {
Core Charge Waiver - + Avoid the core charge by returning within 30 days
@@ -60,7 +78,7 @@ const SpecialOffer = () => {
Free Core Return - + Unlike competitors, we pay for the return of your core