Commit Graph

4 Commits

Author SHA1 Message Date
Unchained
3c3f4129c8 feat: Implement comprehensive OpenPanel analytics tracking
Complete analytics overhaul with 30+ tracking events:

E-commerce Events:
- Product views, image views, variant selection
- Add/remove from cart, quantity changes
- Cart open and abandonment tracking
- Checkout funnel (all steps)
- Payment/shipping method selection
- Order completion with revenue tracking

User Engagement:
- Search queries with filters
- CTA clicks, external link clicks
- Element engagement (click/hover/view)
- Newsletter signups
- Promo code usage
- Wishlist actions

User Identity:
- User identification
- Property setting
- Screen/session tracking

Technical:
- Proper TypeScript types for all events
- Increment/decrement counters
- Pending revenue for cart abandonment
- Comprehensive error handling

Includes complete documentation in docs/ANALYTICS_GUIDE.md
2026-03-29 20:25:21 +02:00
Unchained
e15e6470d2 fix: Add SALEOR_API_TOKEN auth for COD transaction creation
- Add SALEOR_API_TOKEN environment variable support
- Update Apollo client to include auth header
- Enable COD transaction creation after checkout
2026-03-29 18:22:16 +02:00
Unchained
ff481f18c3 feat: implement Cash on Delivery (COD) payment method
This commit adds comprehensive COD support using Saleor's native Transaction system:

**Architecture:**
- Uses Saleor's native Transaction objects (not metadata)
- Modular payment method configuration
- Extensible design for future payment types (cards, bank transfer, etc.)

**New Components:**
- PaymentMethodSelector: Reusable payment method selection UI
- PaymentMethodCard: Individual payment method card
- CODInstructions: COD-specific instructions and guidance
- PaymentSection: Checkout integration wrapper

**Core Features:**
- COD selected by default for Serbia (default-channel)
- Transaction created automatically on order completion
- Transaction visible in Saleor Dashboard
- Multi-language support (EN, SR, DE, FR)
- No additional fees
- Instructions shown to customer (prepare cash, inspect order, no fee)

**Files Added:**
- docs/COD-IMPLEMENTATION-PLAN.md
- src/lib/config/paymentMethods.ts
- src/lib/saleor/payments/types.ts
- src/lib/saleor/payments/cod.ts
- src/components/payment/PaymentMethodSelector.tsx
- src/components/payment/PaymentMethodCard.tsx
- src/components/payment/CODInstructions.tsx
- src/components/payment/index.ts
- src/app/[locale]/checkout/components/PaymentSection.tsx

**Files Modified:**
- src/app/[locale]/checkout/page.tsx (added payment section, transaction creation)
- src/i18n/messages/{en,sr,de,fr}.json (payment translations)

**Technical Details:**
- Transaction status: NOT_CHARGED
- Available actions: [CHARGE]
- PSP Reference format: COD-{orderNumber}-{timestamp}
- Staff collects cash and fulfills order via Dashboard

Closes: Cash on Delivery payment implementation
2026-03-29 06:02:51 +02:00
Unchained
f66f9b87ab docs: Add comprehensive feature roadmap with 20 optimization features
- Organized into 7 implementation phases with dependencies
- Includes priority matrix (P0/P1/P2)
- Revenue and SEO impact ratings
- Success metrics for tracking
- Resource requirements and timeline estimates
- Dependency graph showing implementation order
2026-03-25 21:54:38 +02:00