# Checkout Page — Full Audit & Redesign Plan

## Problem Statement

The checkout page (`checkout.php`) currently has **hardcoded add-ons** (Branding Kit, App Store Publishing, Marketing Stack, Compliance Roadmap) that show **regardless of what product or service** the user is buying. This doesn't make sense:

- **Tech Team for Hire** (subscription service) → Should **NOT** show "Branding Kit" or "App Store Publishing" add-ons. These are irrelevant to a monthly engineering squad retainer.
- **White-label products** like Digital Wallet, Remittance → Add-ons like "Branding Kit" and "App Store Publishing" make sense here since the customer is launching their own app.
- **Business systems** like ERP, CRM, Accounting → "App Store Publishing" doesn't apply (these are web platforms). "Branding Kit" may apply.

---

## Audit Findings

### 1. Product Taxonomy (What Nesvra Actually Sells)

| Category | Product Slug | Type | Has Pricing Tiers? | Currently Links to Checkout? |
|----------|-------------|------|---------------------|------------------------------|
| **Services** | `tech-team` | Subscription | ✅ 4 tiers (Foundation/Growth/Enterprise/Enterprise+) | ✅ Yes |
| **Systems** | `systems-erp` | One-time license | ✅ 4 tiers (Starter/Growth/Enterprise/Enterprise+) | ✅ Yes |
| **Systems** | `systems-crm` | One-time license | ❌ No pricing on page | ❌ Uses `get-started.php` |
| **Systems** | `systems-accounting` | One-time license | ❌ No pricing on page | ❌ Uses `get-started.php` |
| **Systems** | `systems-enterprise-os` | One-time license | ❌ No pricing on page | ❌ Uses `get-started.php` |
| **Fintech** | `remittance` | One-time license | ❌ Single plan | ✅ Yes |
| **Fintech** | `digital-wallet` | One-time license | ❌ Single plan | ✅ Yes |
| **Fintech** | `virtual-card` | One-time license | ❌ Single plan | ✅ Yes |
| **Fintech** | `payment-gateway` | One-time license | ❌ Single plan | ❌ Not yet |
| **Fintech** | `gift-cards` | One-time license | ❌ Single plan | ✅ Yes |
| **Fintech** | `core-banking` | One-time license | ❌ Single plan | ✅ Yes |

### 2. Add-ons Should Be Contextual Per Product Type

> [!IMPORTANT]
> Add-ons must live **inside the catalog data**, not hardcoded in HTML. Each product type gets its own relevant add-ons.

| Add-on | Applies to Fintech Products? | Applies to Business Systems? | Applies to Tech Team? |
|--------|------------------------------|------------------------------|-----------------------|
| Branding & Identity Kit ($250) | ✅ Yes | ✅ Yes | ❌ No |
| App Store & Play Store Publishing ($250) | ✅ Yes (mobile apps) | ❌ No (web only) | ❌ No |
| Marketing & Growth Analytics Stack ($400) | ✅ Yes | ❌ No | ❌ No |
| Licensing & Compliance Roadmap ($600) | ✅ Yes (regulatory) | ❌ No | ❌ No |
| Extended Support (+6 months) ($500) | ✅ Yes | ✅ Yes | ❌ No |
| Server & Cloud Infrastructure Setup ($350) | ✅ Yes | ✅ Yes | ❌ No |

### 3. Pages Still Using `get-started.php` (Not Connected to Checkout)

These pages have CTA buttons pointing to `get-started.php` instead of the checkout flow:

- `systems-crm.php` (3 links)
- `systems-accounting.php` (3 links)
- `systems-enterprise-operating-system.php` (3 links)
- `solutions-infrastructure-access.php` (3 links)
- `solutions-business-operating-system.php` (2 links)
- `solutions.php` (1 link)
- `systems.php` (2 links)
- Various industry pages (banking, ecommerce, education, etc.)
- `index.php`, `about.php`, navbar, footer

> [!NOTE]
> The `get-started.php` links on general pages (navbar, footer, index, about, industry pages) are fine—those are meant as a general "contact sales" entry point. We should **NOT** change those. Only product-specific purchase/acquire CTAs should go to checkout.

---

## Proposed Changes

### 1. Move add-ons into the catalog data structure

Each product in the `$catalog` array gets an `'addons'` key with only the relevant add-ons for that product type. If the product has no applicable add-ons (like Tech Team), the array is empty and the add-ons section is hidden entirely.

#### [MODIFY] [checkout.php](file:///c:/xampp/htdocs/NesvraEcosystem/checkout.php)

- Move add-ons from hardcoded HTML into `$catalog` data per product
- Render add-ons dynamically from `$activeProduct['addons']` 
- Hide the entire add-ons section when the array is empty
- Pass add-ons to JS for live total recalculation
- Change product-type labeling: Show "monthly subscription" for `tech-team`, "one-time license" for products

---

## Open Questions

> [!IMPORTANT]
> **Q1: Should the "product switcher" dropdown at top-right of checkout be removed?** Currently a user can switch between *any* product in the catalog from the checkout page. This seems odd for a real checkout—normally you'd expect only the product you selected. Should we keep it or remove it?

> [!IMPORTANT]
> **Q2: For systems-crm, systems-accounting, and systems-enterprise-os — do these have pricing yet?** They currently all point to `get-started.php`. Should we add them to the checkout catalog with prices, or leave them as "contact sales" for now?

> [!IMPORTANT]
> **Q3: For `solutions-custom-software-development.php` and `solutions-launch-tech-business.php` — are these purchasable products or consultation-based services?** Should they link to checkout or remain as "book a call" flows?

---

## Verification Plan

### Manual Verification
1. Visit `checkout?product=tech-team&plan=growth` → Confirm **no add-ons section** appears
2. Visit `checkout?product=digital-wallet` → Confirm add-ons appear (Branding, App Store, etc.)
3. Visit `checkout?product=systems-erp&plan=starter` → Confirm only system-relevant add-ons appear (Branding, Server Setup, Extended Support — no App Store, no Compliance)
4. Test auth gate: visit checkout while logged out → confirm redirect to auth and back
