# WooNooW Settings Tree - Implementation Plan ## ๐Ÿ“‹ Overview This document defines the complete settings structure for WooNooW Admin SPA, using a **Shopify-inspired approach** that focuses on store success rather than technical configuration. --- ## ๐ŸŽฏ Strategy: Modern SaaS Approach (Shopify-Inspired) **Philosophy:** - **Store-first, not tech-first** - Settings encourage business growth - **Simple, fast, smooth** - Better UX than WooCommerce's complex tabs - **Logical grouping** - Our own hierarchy, not WooCommerce's legacy structure - **Progressive disclosure** - Show what matters, hide complexity - **Action-oriented** - "Set up payments" not "Payment gateway settings" **Key Differences from WooCommerce:** - โŒ No confusing tabs and sub-tabs - โŒ No technical jargon - โŒ No overwhelming forms - โœ… Clear sections with visual cards - โœ… Setup wizards for complex tasks - โœ… Inline help and examples - โœ… Mobile-friendly interface --- ## ๐ŸŒฒ Settings Tree Structure (Shopify-Inspired) ``` Settings โ”œโ”€โ”€ ๐Ÿช Store Details โ”‚ โ””โ”€โ”€ /settings/store โ”‚ โ€ข Store name, contact info โ”‚ โ€ข Store address (for invoices, shipping origin) โ”‚ โ€ข Currency & formatting โ”‚ โ€ข Timezone & units โ”‚ โ€ข Store industry/type โ”‚ โ”œโ”€โ”€ ๐Ÿ’ณ Payments โ”‚ โ””โ”€โ”€ /settings/payments โ”‚ โ€ข Payment providers (cards: Stripe, PayPal, etc.) โ”‚ โ€ข Manual methods (bank transfer, cash, check) โ”‚ โ€ข Payment capture settings โ”‚ โ€ข Test mode toggle โ”‚ โ”œโ”€โ”€ ๐Ÿ“ฆ Shipping & Delivery โ”‚ โ””โ”€โ”€ /settings/shipping โ”‚ โ€ข Shipping zones (visual map) โ”‚ โ€ข Shipping rates (simple table) โ”‚ โ€ข Local pickup options โ”‚ โ€ข Free shipping rules โ”‚ โ€ข Delivery time estimates โ”‚ โ”œโ”€โ”€ ๐Ÿ’ฐ Taxes โ”‚ โ””โ”€โ”€ /settings/taxes โ”‚ โ€ข Tax calculation (auto or manual) โ”‚ โ€ข Tax rates by region (simple table) โ”‚ โ€ข Tax-inclusive pricing toggle โ”‚ โ€ข Tax exemptions โ”‚ โ”œโ”€โ”€ ๐Ÿ›๏ธ Checkout โ”‚ โ””โ”€โ”€ /settings/checkout โ”‚ โ€ข Checkout fields (required/optional) โ”‚ โ€ข Guest checkout toggle โ”‚ โ€ข Account creation options โ”‚ โ€ข Order notes โ”‚ โ€ข Terms & conditions โ”‚ โ”œโ”€โ”€ ๐Ÿ‘ค Customer Accounts โ”‚ โ””โ”€โ”€ /settings/customers โ”‚ โ€ข Account creation settings โ”‚ โ€ข Login options โ”‚ โ€ข Customer data retention โ”‚ โ€ข Privacy policy โ”‚ โ”œโ”€โ”€ ๐Ÿ“ง Notifications โ”‚ โ””โ”€โ”€ /settings/notifications โ”‚ โ€ข Email templates (visual editor) โ”‚ โ€ข Order notifications (customer & admin) โ”‚ โ€ข Shipping notifications โ”‚ โ€ข Email sender details โ”‚ โ€ข SMS notifications (future) โ”‚ โ”œโ”€โ”€ ๐ŸŽจ Brand & Appearance โ”‚ โ””โ”€โ”€ /settings/brand โ”‚ โ€ข Logo upload โ”‚ โ€ข Brand colors โ”‚ โ€ข Email header/footer โ”‚ โ€ข Invoice template โ”‚ โ”œโ”€โ”€ ๐Ÿ”ง WooNooW Settings โ”‚ โ””โ”€โ”€ /settings/woonoow โ”‚ โ€ข Plugin preferences โ”‚ โ€ข Performance settings โ”‚ โ€ข Feature toggles โ”‚ โ€ข License & updates โ”‚ โ”œโ”€โ”€ โš™๏ธ Advanced (Bridge to wp-admin) โ”‚ โ””โ”€โ”€ /wp-admin/admin.php?page=wc-settings&tab=advanced โ”‚ โ”œโ”€โ”€ ๐Ÿ”Œ Integrations (Bridge to wp-admin) โ”‚ โ””โ”€โ”€ /wp-admin/admin.php?page=wc-settings&tab=integration โ”‚ โ”œโ”€โ”€ ๐Ÿ” System Status (Bridge to wp-admin) โ”‚ โ””โ”€โ”€ /wp-admin/admin.php?page=wc-status โ”‚ โ””โ”€โ”€ ๐Ÿงฉ Extensions (Bridge to wp-admin) โ””โ”€โ”€ /wp-admin/admin.php?page=wc-addons ``` --- ## ๐Ÿ“Š Implementation Priority (Shopify-Inspired) ### **Phase 1: Foundation (HIGH PRIORITY)** ๐Ÿ”ด #### 1. Store Details (`/settings/store`) **Purpose:** Core store information - the foundation of everything **Complexity:** Low-Medium **Estimated Time:** 4-6 hours **Shopify Equivalent:** Settings > General **Layout:** Single-page form with clear sections **Sections:** **A. Store Identity** - Store name (text input with live preview) - Contact email (for customer inquiries) - Customer support email (separate from admin) - Store phone number (optional) **B. Store Address** - Country/Region (dropdown with flags) - Street address (autocomplete) - City, State/Province, Postal code - _Used for: shipping origin, invoices, tax calculations_ **C. Currency & Formatting** - Currency (searchable dropdown with symbols) - Currency position (before/after amount) - Thousand separator (`,` or `.` or space) - Decimal separator (`.` or `,`) - Number of decimals (0-4) - _Live preview: $1,234.56_ **D. Standards & Formats** - Timezone (auto-detect with manual override) - Unit system (Metric / Imperial) - Weight unit (kg, g, lb, oz) - Dimension unit (cm, m, in, ft) **E. Store Type** (helps with recommendations) - Industry (dropdown: Fashion, Electronics, Food, etc.) - Business type (B2C, B2B, Both) **UI/UX:** - Clean, spacious layout - Inline validation - Live preview for currency formatting - Auto-save draft (save button at top) - "Your store is located in Indonesia ๐Ÿ‡ฎ๐Ÿ‡ฉ" summary card --- #### 2. Payments (`/settings/payments`) **Purpose:** Get paid - make it dead simple **Complexity:** Medium **Estimated Time:** 6-8 hours **Shopify Equivalent:** Settings > Payments **Layout:** Card-based interface, not a table **Sections:** **A. Payment Providers** (Visual Cards) ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ’ณ Credit & Debit Cards โ”‚ โ”‚ โ”‚ โ”‚ [Stripe Logo] Stripe Payments โ”‚ โ”‚ โ—‹ Not connected โ”‚ โ”‚ [Set up Stripe] button โ”‚ โ”‚ โ”‚ โ”‚ Accept Visa, Mastercard, Amex โ”‚ โ”‚ 2.9% + $0.30 per transaction โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ [PayPal Logo] PayPal โ”‚ โ”‚ โ— Connected โ”‚ โ”‚ [Manage] [Disconnect] โ”‚ โ”‚ โ”‚ โ”‚ buyer@example.com โ”‚ โ”‚ 3.49% + fixed fee per transaction โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` **B. Manual Payment Methods** (Simpler cards) - Bank Transfer (BACS) - toggle + instructions field - Cash on Delivery - toggle + fee option - Check Payments - toggle + instructions **C. Payment Settings** - Test mode (big toggle with warning banner) - Payment capture (Authorize only / Authorize and capture) - Accepted payment methods (checkboxes with icons) **UI/UX:** - Big, visual cards (not boring table rows) - "Add payment provider" button with modal - Setup wizard for Stripe/PayPal (not raw API keys) - Test mode banner: "โš ๏ธ Test Mode Active - No real charges" - Drag to reorder (shows on checkout) --- #### 3. Shipping & Delivery (`/settings/shipping`) **Purpose:** Get products to customers **Complexity:** Medium-High **Estimated Time:** 8-10 hours **Shopify Equivalent:** Settings > Shipping and delivery **Layout:** Zone-based with visual hierarchy **Sections:** **A. Shipping Zones** (Card list, not table) ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐ŸŒ Domestic (Indonesia) โ”‚ โ”‚ โ”‚ โ”‚ Regions: All Indonesia โ”‚ โ”‚ Rates: 3 shipping rates โ”‚ โ”‚ โ”‚ โ”‚ โ€ข Standard Shipping - Rp 15,000 โ”‚ โ”‚ โ€ข Express Shipping - Rp 30,000 โ”‚ โ”‚ โ€ข Free Shipping - Free (>Rp 500k) โ”‚ โ”‚ โ”‚ โ”‚ [Edit zone] [Delete] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐ŸŒ International โ”‚ โ”‚ โ”‚ โ”‚ Regions: Rest of world โ”‚ โ”‚ Rates: 1 shipping rate โ”‚ โ”‚ โ”‚ โ”‚ โ€ข International - Calculated โ”‚ โ”‚ โ”‚ โ”‚ [Edit zone] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ [+ Add shipping zone] button ``` **B. Zone Editor** (Modal or slide-over) - Zone name - Countries/Regions (multi-select with search) - Shipping rates: - Name (e.g., "Standard Shipping") - Price (flat rate or calculated) - Conditions (order total, weight, etc.) - Transit time (e.g., "3-5 business days") **C. Local Pickup** - Enable local pickup (toggle) - Pickup locations (list with add/edit) - Pickup instructions **D. Shipping Settings** - Show delivery estimates (toggle) - Require shipping address (toggle) - Hide shipping costs until address entered (toggle) **UI/UX:** - Visual zone cards, not boring table - "Add rate" button per zone - Inline rate editor (no page reload) - Drag to reorder rates - Smart defaults: "Domestic" zone auto-created - Map visualization (future enhancement) --- ### **Phase 2: Customer Experience (MEDIUM PRIORITY)** ๐ŸŸก #### 4. Taxes (`/settings/taxes`) **Purpose:** Handle taxes simply **Complexity:** Medium **Estimated Time:** 5-7 hours **Shopify Equivalent:** Settings > Taxes and duties **Layout:** Simple toggle + table **Sections:** **A. Tax Collection** - Collect taxes (big toggle) - Prices include tax (toggle) - Calculate tax based on (customer address / shop address) **B. Tax Rates** (Simple table, not WooCommerce's complex structure) ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Region โ”‚ Rate โ”‚ Shippingโ”‚ Actions โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Indonesia โ”‚ 11% โ”‚ โœ“ โ”‚ Edit โ”‚ โ”‚ Singapore โ”‚ 9% โ”‚ โœ“ โ”‚ Edit โ”‚ โ”‚ Malaysia โ”‚ 6% โ”‚ โœ“ โ”‚ Edit โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ [+ Add tax rate] ``` **C. Tax Settings** - Show tax breakdown at checkout (toggle) - Tax exemptions (for wholesale, etc.) **UI/UX:** - Auto-detect tax rates by country (suggest common rates) - Simple table, not WooCommerce's confusing priority/compound system - "Need help? We can set this up for you" link --- #### 5. Checkout (`/settings/checkout`) **Purpose:** Optimize the buying experience **Complexity:** Low-Medium **Estimated Time:** 4-5 hours **Shopify Equivalent:** Settings > Checkout **Layout:** Toggle-heavy with smart defaults **Sections:** **A. Customer Information** - Company name (Show / Hide / Optional) - Phone number (Required / Optional / Hidden) - Address line 2 (Show / Hide) **B. Checkout Options** - Guest checkout (toggle - default ON) - Account creation at checkout (toggle) - Order notes field (toggle) - Marketing opt-in checkbox (toggle) **C. Order Processing** - Terms and conditions (toggle + page selector) - Privacy policy (toggle + page selector) - Automatically complete orders (for digital products) **UI/UX:** - Live preview of checkout form - Smart defaults (guest checkout ON, company name optional) - "Recommended" badges on best practices --- #### 6. Customer Accounts (`/settings/customers`) **Purpose:** Customer login and data **Complexity:** Low **Estimated Time:** 3-4 hours **Shopify Equivalent:** Settings > Customer accounts **Layout:** Simple toggles and options **Sections:** **A. Account Creation** - Customers can create accounts (toggle) - Account creation locations: - โ˜‘ During checkout - โ˜‘ On "My Account" page - โ˜ Require accounts to purchase **B. Login Options** - Email or username (radio) - Social login (future: Google, Facebook) - Password requirements (dropdown: None / Medium / Strong) **C. Customer Data** - Data retention period (dropdown: Forever / 1 year / 2 years / 3 years) - Download data retention (dropdown: Forever / 6 months / 1 year) - Privacy policy page (page selector) **UI/UX:** - Clear explanations for GDPR compliance - "Learn about data privacy" help links --- ### **Phase 3: Communication & Branding (MEDIUM PRIORITY)** ๐ŸŸก #### 7. Notifications (`/settings/notifications`) **Purpose:** Keep customers informed **Complexity:** Medium **Estimated Time:** 6-8 hours **Shopify Equivalent:** Settings > Notifications **Layout:** Email list + visual editor **Sections:** **A. Customer Notifications** (Card list with toggle) ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ— Order confirmation โ”‚ โ”‚ Sent when order is placed โ”‚ โ”‚ [Edit template] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ— Shipping confirmation โ”‚ โ”‚ Sent when order is shipped โ”‚ โ”‚ [Edit template] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ—‹ Order cancelled โ”‚ โ”‚ Sent when order is cancelled โ”‚ โ”‚ [Edit template] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` **B. Admin Notifications** - New order (toggle + recipients) - Low stock alert (toggle + threshold) - Failed payment (toggle) **C. Email Settings** - Sender name (e.g., "WooNooW Store") - Sender email (e.g., "noreply@yourstore.com") - Email footer text **D. Template Editor** (Per email, modal/slide-over) - Subject line (with variables: {{order_number}}, {{customer_name}}) - Email heading - Body content (rich text editor) - Live preview (desktop + mobile) **UI/UX:** - Visual email builder (not raw HTML) - Variable picker (click to insert {{customer_name}}) - Send test email button - Mobile preview --- #### 8. Brand & Appearance (`/settings/brand`) **Purpose:** Make it yours **Complexity:** Low-Medium **Estimated Time:** 4-5 hours **Shopify Equivalent:** Settings > Brand (new in Shopify) **Layout:** Visual, design-focused **Sections:** **A. Logo & Colors** - Store logo (upload, max 500KB) - Brand color (color picker) - Accent color (color picker) - _Used in: emails, invoices, admin interface_ **B. Email Design** - Email header image (upload) - Email background color - Email text color - Footer text (e.g., "ยฉ 2025 Your Store") **C. Invoice Template** - Invoice logo (use store logo / upload different) - Invoice header text - Invoice footer text - Tax ID / Business registration number **UI/UX:** - Live preview of email with your branding - Live preview of invoice - Color picker with presets - Image cropper for logo --- ### **Phase 4: Advanced (KEEP IN WP-ADMIN)** โšช These settings are rarely used and can remain in wp-admin: #### 8. Advanced Settings (Bridge) - Page setup (cart, checkout, my account, terms) - REST API - Webhooks - Legacy API - WooCommerce.com account #### 9. Integration Settings (Bridge) - MaxMind Geolocation - Other integrations #### 10. System Status (Bridge) - System status report - Tools (clear cache, regenerate thumbnails, etc.) - Logs - Scheduled actions #### 11. Extensions (Bridge) - WooCommerce marketplace - Browse extensions - My subscriptions --- ## ๐Ÿ”ง Technical Implementation ### Backend (PHP) **Files to Create/Modify:** 1. `includes/Admin/Rest/SettingsController.php` - REST endpoints 2. `includes/Compat/SettingsProvider.php` - Settings data provider 3. `includes/Compat/NavigationRegistry.php` - โœ… Already updated **REST Endpoints:** ```php GET /wp-json/woonoow/v1/settings/store POST /wp-json/woonoow/v1/settings/store GET /wp-json/woonoow/v1/settings/payments POST /wp-json/woonoow/v1/settings/payments GET /wp-json/woonoow/v1/settings/shipping POST /wp-json/woonoow/v1/settings/shipping GET /wp-json/woonoow/v1/settings/taxes POST /wp-json/woonoow/v1/settings/taxes GET /wp-json/woonoow/v1/settings/checkout POST /wp-json/woonoow/v1/settings/checkout GET /wp-json/woonoow/v1/settings/customers POST /wp-json/woonoow/v1/settings/customers GET /wp-json/woonoow/v1/settings/notifications POST /wp-json/woonoow/v1/settings/notifications GET /wp-json/woonoow/v1/settings/brand POST /wp-json/woonoow/v1/settings/brand ``` **Data Flow:** 1. Frontend requests settings via REST API 2. Backend reads from WooCommerce options 3. Backend returns structured JSON 4. Frontend displays in form 5. User submits changes 6. Backend validates and saves to WooCommerce options 7. Frontend shows success/error --- ### Frontend (React/TypeScript) **Files to Create:** ``` admin-spa/src/routes/Settings/ โ”œโ”€โ”€ index.tsx โœ… Done (WooNooW settings) โ”œโ”€โ”€ Store.tsx โณ Store details (Shopify-style) โ”œโ”€โ”€ Payments.tsx โณ Payment providers (card-based) โ”œโ”€โ”€ Shipping.tsx โณ Shipping zones (visual cards) โ”œโ”€โ”€ Taxes.tsx โณ Tax rates (simple table) โ”œโ”€โ”€ Checkout.tsx โณ Checkout options โ”œโ”€โ”€ Customers.tsx โณ Customer accounts โ”œโ”€โ”€ Notifications.tsx โณ Email templates โ”œโ”€โ”€ Brand.tsx โณ Branding & appearance โ””โ”€โ”€ components/ โ”œโ”€โ”€ SettingsLayout.tsx โณ Consistent layout wrapper โ”œโ”€โ”€ SettingsCard.tsx โณ Card component (Shopify-style) โ”œโ”€โ”€ SettingsSection.tsx โณ Section with heading โ”œโ”€โ”€ ToggleField.tsx โณ Toggle switch โ”œโ”€โ”€ PaymentProviderCard.tsx โณ Payment provider card โ”œโ”€โ”€ ShippingZoneCard.tsx โณ Shipping zone card โ”œโ”€โ”€ TaxRateTable.tsx โณ Simple tax table โ”œโ”€โ”€ EmailTemplateCard.tsx โณ Email template card โ”œโ”€โ”€ ColorPicker.tsx โณ Color picker โ”œโ”€โ”€ ImageUploader.tsx โณ Image upload โ””โ”€โ”€ LivePreview.tsx โณ Live preview component ``` **Shared Components:** - Form wrapper with save/cancel - Field renderer (text, select, checkbox, radio, textarea, color, image) - Section headers - Help text/tooltips - Validation messages - Loading states - Success/error notifications --- ## ๐ŸŽจ UI/UX Guidelines (Shopify-Inspired) ### Visual Design - **Card-based layout** - Not boring forms - **Generous whitespace** - Breathable, not cramped - **Visual hierarchy** - Clear sections with icons - **Color-coded status** - Green (active), Gray (inactive), Yellow (test mode) - **Illustrations** - Empty states, onboarding ### Layout Patterns - **Single-column on mobile** - Stack everything - **Two-column on desktop** - Content + sidebar (for help/tips) - **Sticky save bar** - Always visible at top - **Progressive disclosure** - Show basics, hide advanced in expandable sections ### Interactive Elements - **Big toggle switches** - Not tiny checkboxes - **Visual cards** - Payment providers, shipping zones as cards - **Inline editing** - Edit in place, not separate pages - **Drag and drop** - Reorder zones, rates, emails - **Live previews** - Currency format, email templates, invoices ### Forms & Validation - **Smart defaults** - Pre-fill with best practices - **Inline validation** - Real-time feedback - **Help text everywhere** - Explain what each field does - **Examples** - "e.g., Standard Shipping" - **Recommended badges** - "โœ“ Recommended" for best practices ### Feedback & States - **Optimistic updates** - Show change immediately, save in background - **Toast notifications** - "Settings saved" (not alerts) - **Loading states** - Skeleton screens, not spinners - **Empty states** - "No payment providers yet. Add one to get started." - **Error states** - Friendly messages with solutions ### Mobile-First - **Touch-friendly** - 44px minimum tap targets - **Swipe actions** - Swipe to delete/edit - **Bottom sheets** - Modals slide from bottom on mobile - **Responsive tables** - Stack columns on mobile ### Accessibility - **Keyboard navigation** - Tab through everything - **Screen reader labels** - Descriptive ARIA labels - **Focus indicators** - Clear blue outline - **Color contrast** - WCAG AA compliant - **Skip links** - Skip to main content --- ## ๐Ÿ“ Implementation Checklist (Shopify-Inspired) ### Phase 1: Foundation - [ ] **Store Details** (`/settings/store`) - [ ] Store identity section (name, emails, phone) - [ ] Store address with autocomplete - [ ] Currency selector with live preview - [ ] Timezone & units - [ ] Store type/industry - [ ] Save/load functionality - [ ] **Payments** (`/settings/payments`) - [ ] Payment provider cards (visual) - [ ] Stripe/PayPal setup wizards - [ ] Manual methods (bank, COD, check) - [ ] Test mode toggle with banner - [ ] Drag-and-drop ordering - [ ] Save/load functionality - [ ] **Shipping & Delivery** (`/settings/shipping`) - [ ] Shipping zone cards (visual) - [ ] Zone editor (modal/slide-over) - [ ] Rate configuration - [ ] Local pickup options - [ ] Drag-and-drop zones/rates - [ ] Save/load functionality ### Phase 2: Customer Experience - [ ] **Taxes** (`/settings/taxes`) - [ ] Tax collection toggle - [ ] Simple tax rate table - [ ] Auto-detect common rates - [ ] **Checkout** (`/settings/checkout`) - [ ] Checkout field options - [ ] Guest checkout toggle - [ ] Terms & privacy - [ ] **Customer Accounts** (`/settings/customers`) - [ ] Account creation settings - [ ] Login options - [ ] Data retention (GDPR) ### Phase 3: Communication & Branding - [ ] **Notifications** (`/settings/notifications`) - [ ] Email template cards - [ ] Visual email editor - [ ] Variable picker - [ ] Live preview - [ ] **Brand & Appearance** (`/settings/brand`) - [ ] Logo uploader - [ ] Color pickers - [ ] Email/invoice preview --- ## ๐Ÿงช Testing Requirements ### Functional Testing - [ ] All fields save correctly - [ ] Validation works - [ ] Default values load - [ ] Changes persist after reload - [ ] Bridge links work - [ ] Mobile responsive ### Integration Testing - [ ] WooCommerce compatibility - [ ] 3rd party gateway support - [ ] Plugin conflict testing - [ ] Multi-currency support ### User Testing - [ ] Intuitive navigation - [ ] Clear labels - [ ] Helpful error messages - [ ] Fast performance --- ## ๐Ÿ“š Documentation ### User Documentation - Settings overview - Field descriptions - Common configurations - Troubleshooting ### Developer Documentation - API endpoints - Filter hooks - Extension points - Code examples --- ## ๐Ÿ”„ Migration Notes **No data migration needed!** - All settings use WooCommerce's native options - Deactivating WooNooW restores wp-admin settings - No data loss risk --- ## ๐ŸŽฏ Success Metrics (Shopify-Inspired) ### Phase 1 Complete When: - โœ… Store, Payments, Shipping pages functional - โœ… Visual card-based UI (not boring forms) - โœ… All fields save/load correctly - โœ… Live previews working (currency, etc.) - โœ… Mobile responsive with touch-friendly UI - โœ… No console errors - โœ… Feels like Shopify (fast, smooth, delightful) ### Phase 2 Complete When: - โœ… Taxes, Checkout, Customers pages functional - โœ… Simple tables (not WooCommerce complexity) - โœ… All validations working - โœ… Smart defaults applied - โœ… Performance acceptable (<2s load) ### Phase 3 Complete When: - โœ… Notifications, Brand pages functional - โœ… Visual email editor working - โœ… Live email/invoice preview - โœ… Color pickers, image uploaders working - โœ… Template customization working --- ## ๐Ÿ“… Timeline Estimate (Shopify-Inspired Approach) | Phase | Pages | Estimated Time | Priority | |-------|-------|----------------|----------| | **Phase 1: Foundation** | Store, Payments, Shipping | 18-24 hours | ๐Ÿ”ด HIGH | | **Phase 2: Customer Experience** | Taxes, Checkout, Customers | 12-16 hours | ๐ŸŸก MEDIUM | | **Phase 3: Communication & Branding** | Notifications, Brand | 10-13 hours | ๐ŸŸก MEDIUM | | **Total** | **8 pages** | **40-53 hours** | | **Breakdown:** - **Store Details:** 4-6 hours (simple, but needs autocomplete & live preview) - **Payments:** 6-8 hours (card UI, setup wizards, drag-drop) - **Shipping:** 8-10 hours (zone cards, rate editor, complex) - **Taxes:** 5-7 hours (simple table, auto-detect) - **Checkout:** 4-5 hours (toggles, live preview) - **Customers:** 3-4 hours (simple toggles) - **Notifications:** 6-8 hours (email editor, preview) - **Brand:** 4-5 hours (color pickers, image upload, preview) **Note:** Times include: - UI design (Shopify-style cards, not forms) - Component development (reusable) - Backend API integration - Testing (functional + UX) - Documentation --- ## ๐Ÿ”— Related Documents - `PROGRESS_NOTE.md` - Development progress - `SPA_ADMIN_MENU_PLAN.md` - Menu structure - `PROJECT_SOP.md` - Development standards - `STANDALONE_MODE_SUMMARY.md` - Mode documentation - `MENU_FIX_SUMMARY.md` - Navigation fix details --- ## ๐Ÿ“Š WooCommerce vs WooNooW Settings Comparison | Aspect | WooCommerce | WooNooW (Shopify-Inspired) | |--------|-------------|----------------------------| | **Layout** | Tabs within tabs | Single pages with cards | | **Navigation** | Confusing hierarchy | Flat, clear menu | | **Forms** | Dense, technical | Spacious, visual | | **Payment Setup** | Raw API keys | Setup wizards | | **Shipping** | Complex table | Visual zone cards | | **Taxes** | Priority/compound system | Simple rate table | | **Emails** | HTML code editor | Visual template builder | | **Branding** | Scattered settings | Dedicated Brand page | | **Mobile** | Not optimized | Touch-friendly | | **Help** | External docs | Inline help everywhere | | **Defaults** | Empty/technical | Smart, business-focused | | **Feel** | Admin panel | Modern SaaS app | --- ## ๐Ÿ’ก Key Design Decisions ### 1. **Store Details Instead of General** - **Why:** "General" is vague. "Store Details" is clear and action-oriented. - **Benefit:** Merchants know exactly what to expect. ### 2. **Card-Based Payment Providers** - **Why:** Visual cards are more engaging than table rows. - **Benefit:** Easier to scan, understand status at a glance. ### 3. **Shipping Zones as Cards** - **Why:** WooCommerce's table is overwhelming. - **Benefit:** Visual hierarchy, easier to manage multiple zones. ### 4. **Simple Tax Table** - **Why:** WooCommerce's priority/compound system confuses users. - **Benefit:** 90% of stores just need region + rate. ### 5. **Separate Checkout & Customer Pages** - **Why:** WooCommerce lumps them together. - **Benefit:** Clearer separation of concerns. ### 6. **Notifications Instead of Emails** - **Why:** "Notifications" is more modern and broader (future: SMS, push). - **Benefit:** Future-proof naming. ### 7. **Brand & Appearance Page** - **Why:** Shopify's newest addition, highly requested. - **Benefit:** One place for all branding (logo, colors, templates). ### 8. **Progressive Disclosure** - **Why:** Don't overwhelm with all options at once. - **Benefit:** Show basics, hide advanced in expandable sections. --- ## ๐Ÿš€ Implementation Strategy ### Week 1-2: Foundation (Phase 1) 1. **Store Details** - Get the basics right 2. **Payments** - Critical for business 3. **Shipping** - Most complex, tackle early ### Week 3: Customer Experience (Phase 2) 4. **Taxes** - Simpler than WooCommerce 5. **Checkout** - Quick wins with toggles 6. **Customers** - Simple settings ### Week 4: Polish (Phase 3) 7. **Notifications** - Email templates 8. **Brand** - Visual polish ### Ongoing: Iteration - User feedback - Performance optimization - Mobile refinement - Accessibility audit --- **Last Updated:** November 5, 2025 **Status:** ๐Ÿ“‹ Planning Complete - Shopify-Inspired Approach Adopted **Strategy:** Store-first, visual, simple, fast **Next Step:** Implement Phase 1 - Store Details page **Estimated Total:** 40-53 hours for all 8 pages