React Shared Components

Interactive testing environment for react-shared components

Theme Playground

Current: Default

OrderBump

A one-time offer component for upselling additional products during checkout.

Interactive Playground

Current State: Unchecked

ONE TIME OFFER

Bonus Training Module for just $4,900

Common Use Cases

Regular Price Offer

ONE TIME OFFER

Premium Support Package for just $9,900

Sale Price Offer

ONE TIME OFFER

Advanced Course Bundle for just $9,900($19,900 Value)

EUR Currency

ONE TIME OFFER

Exclusive Templates for just €2,900

Currency Override

ONE TIME OFFER

Lifetime Access for just £14,900

Low Price Add-on

ONE TIME OFFER

Quick Start Guide PDF for just $500

High Value Upsell

ONE TIME OFFER

1-on-1 Coaching Session for just $29,900($49,900 Value)

API Reference

PropTypeDefaultDescription
secondBuiltInProductOrderBumpProductRequiredProduct data for the upsell offer
userOrderBumpUserRequiredUser data including currency preference
idstringundefinedCustom ID for the checkbox (auto-generated if not provided)
isPageProcessingbooleanfalseDisables the checkbox during processing
classNamestringundefinedAdditional CSS classes
onStateChanged(checked: boolean) => voidundefinedCallback when checkbox state changes

Type Definitions

tsx
interface OrderBumpProduct {
  data: {
    product: {
      title: string;
      price: Price;
    };
    currency_override?: {
      enabled?: boolean;
      currency?: string;
    };
  };
}

interface OrderBumpUser {
  data: {
    currency?: string;
  };
}

interface Price {
  amount: number;
  sale_amount: number;
  sale_amount_available: boolean;
}

Features

  • Eye-catching "One Time Offer" design with red underlined heading
  • Automatic price formatting based on currency
  • Sale price support with strikethrough original price
  • Currency override capability per product
  • Internationalization support via useTranslation hook
  • Checkbox state management with callback
  • Processing state to disable interaction during checkout
  • Accessible with proper label associations
  • Theme-aware styling with accent colors

Usage Notes

Currency Logic: The component first checks for currency_override in the product data. If enabled, it uses that currency; otherwise, it falls back to the user's currency preference.

Sale Pricing: When sale_amount_available is true, the component displays both the sale price and the original price with a strikethrough.

Translations: The component uses translation keys for "One Time Offer", "Yes", and the offer text. Make sure these are defined in your locale files.

State Management: Use the onStateChanged callback to track when users opt-in to the upsell and update your cart/checkout accordingly.

Processing State: Set isPageProcessing to true during checkout submission to prevent users from changing their selection.

Best Practices: Place this component strategically in your checkout flow, typically after the main product selection but before payment details.