Newwebshop/PHASE2_PLAN.md

279 lines
9.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Phase 2 Entwicklungsplan: Nachbau aller fehlenden PrestaShop-Features + Modul-Kompatibilität
## Ziel
Alle wesentlichen Funktionen von PrestaShop werden nachgebaut UND das System wird PrestaShop-Module und Addons ohne Änderungen nutzen können. Dazu wird das komplette PrestaShop-Modul-System implementiert.
---
## Übersicht & Zeitrahmen
- **Gesamtdauer:** 8-10 Wochen (inkl. PrestaShop-Kompatibilität)
- **Sprint-Länge:** 1 Woche
- **Start:** [TT.MM.JJJJ]
- **Ende (geplant):** [TT.MM.JJJJ]
---
## Aufgabenliste & Prioritäten
| Nr. | Feature/Modul | Beschreibung | Priorität | Zeitrahmen | Status |
|-----|------------------------------|-----------------------------------------------------------|-----------|------------|-----------|
| 1 | **Hook-System** | PrestaShop Hook-System für Module-Kompatibilität | KRITISCH | 1 Woche | ✅ erledigt |
| 2 | **Module-Base-System** | Module-Base-Class, Installation/Deinstallation | KRITISCH | 1 Woche | ✅ erledigt |
| 3 | **Override-System** | Class/Template/Controller Overrides | HOCH | 1 Woche | ⬜ offen |
| 4 | **Context-System** | PrestaShop Context-API nachbauen | HOCH | 1 Woche | ⬜ offen |
| 5 | **Produktvarianten** | Attribute, Kombinationen, Lager pro Variante | HOCH | 1 Woche | ⬜ offen |
| 6 | **Produktbewertungen** | Kundenbewertungen, Moderation, Sterne, hilfreich | HOCH | 1 Woche | ⬜ offen |
| 7 | **Gutschein-/Rabatt-System** | Gutscheine, Warenkorbregeln, Rabatte | HOCH | 1 Woche | ⬜ offen |
| 8 | **Kundenkonto-Features** | Adressverwaltung, Bestellhistorie, Rücksendungen | HOCH | 1 Woche | ⬜ offen |
| 9 | **Versandmethoden & Tracking** | Versandarten, Kosten, Tracking, Versandstatus | HOCH | 1 Woche | ⬜ offen |
| 10 | **Produktvergleich** | Vergleichsliste, UI, Session-Handling | MITTEL | 0,5 Woche | ⬜ offen |
| 11 | **Cross-Selling & Zubehör** | Verwandte Produkte, Zubehör, Upselling | MITTEL | 0,5 Woche | ⬜ offen |
| 12 | **Wunschliste** | Kundenwunschlisten, Verwaltung, Teilen | MITTEL | 0,5 Woche | ⬜ offen |
| 13 | **Lagerverwaltung** | Bestandsführung, Warnungen, Lieferanten | MITTEL | 0,5 Woche | ⬜ offen |
| 14 | **Berichte & Statistiken** | Umsatz, Topseller, Kunden, Export | MITTEL | 0,5 Woche | ⬜ offen |
| 15 | **Import/Export** | CSV/XML Import/Export für Produkte, Kunden, Bestellungen | MITTEL | 0,5 Woche | ⬜ offen |
| 16 | **Benutzerverwaltung** | Admin-Rollen, Rechte, Logins, Audit-Log | HOCH | 1 Woche | ⬜ offen |
| 17 | **E-Mail-Marketing** | Automatisierte Mails, Kampagnen, Vorlagen | MITTEL | 0,5 Woche | ⬜ offen |
| 18 | **Mehrsprachigkeit (i18n)** | Übersetzungen, Sprachumschaltung, Fallbacks | HOCH | 1 Woche | ⬜ offen |
| 19 | **Template-/Theme-System** | Theme-Engine, Child-Themes, Template-Overrides | HOCH | 1 Woche | ⬜ offen |
| 20 | **Performance-Optimierung** | Caching, Minifizierung, Bildoptimierung | MITTEL | 0,5 Woche | ⬜ offen |
| 21 | **Rechtliches & DSGVO** | Cookie-Consent, Datenschutz, AGB, Widerruf | HOCH | 0,5 Woche | ⬜ offen |
| 22 | **Social Media Integration** | Teilen, Login, Pixel, OpenGraph | NIEDRIG | 0,5 Woche | ⬜ offen |
| 23 | **Affiliate-/Partner-System** | Tracking, Provisionen, Auswertungen | NIEDRIG | 0,5 Woche | ⬜ offen |
| 24 | **PrestaShop-Module-Tests** | Test mit echten PrestaShop-Modulen | HOCH | 1 Woche | ⬜ offen |
---
## PrestaShop Modul-System Komponenten
### 1. **Hook-System** (Priorität: KRITISCH) ✅ ERLEDIGT
```php
// PrestaShop Hook-Beispiele
Hook::exec('actionProductUpdate', ['id_product' => $id]);
Hook::exec('displayProductAdditionalInfo', ['product' => $product]);
Hook::exec('actionCartUpdateQuantityBefore', ['id_product' => $id, 'quantity' => $qty]);
```
**Implementiert:**
- ✅ Hook-Registry
- ✅ Hook-Execution
- ✅ Module-Hook-Registration
- ✅ Hook-Parameter-Handling
### 2. **Module-System** (Priorität: KRITISCH) ✅ ERLEDIGT
```php
// PrestaShop Module-Struktur
class MyModule extends Module
{
public function __construct()
{
$this->name = 'mymodule';
$this->tab = 'front_office_features';
$this->version = '1.0.0';
$this->author = 'Your Name';
$this->need_instance = 0;
}
public function install()
{
return parent::install() &&
$this->registerHook('displayProductAdditionalInfo');
}
}
```
**Implementiert:**
- ✅ Module-Base-Class
- ✅ Module-Installation/Deinstallation
- ✅ Module-Konfiguration
- ✅ Module-Admin-Interface
### 3. **Override-System** (Priorität: HOCH) ⬜ OFFEN
```php
// PrestaShop Override-Beispiele
// classes/Product.php -> modules/mymodule/override/classes/Product.php
// controllers/front/ProductController.php -> modules/mymodule/override/controllers/front/ProductController.php
```
**Zu implementieren:**
- ⬜ Class-Override-Detection
- ⬜ Template-Override-System
- ⬜ Controller-Override-System
- ⬜ Override-Priority-System
### 4. **Module-API & Services** (Priorität: HOCH) ⬜ OFFEN
```php
// PrestaShop Service-Beispiele
$this->context->shop
$this->context->language
$this->context->currency
Module::getInstanceByName('mymodule')
```
**Zu implementieren:**
- ⬜ Context-System
- ⬜ Service-Container
- ⬜ Module-Discovery
- ⬜ Module-Dependencies
---
## Fortschrittstracker
- ⬜ offen | 🟡 in Arbeit | ✅ erledigt
**Aktueller Fortschritt: 8% (2/24 Features)**
---
## Sprint-Planung
### **Sprint 1 (Woche 1): PrestaShop-Kompatibilität Basis** ✅ ABGESCHLOSSEN
- ✅ Hook-System (KRITISCH)
- ✅ Module-Base-Class (KRITISCH)
- ✅ Module-Installation/Deinstallation
### **Sprint 2 (Woche 2): PrestaShop-Kompatibilität Erweitert** 🟡 AKTUELL
- 🟡 Override-System
- ⬜ Context-System
- ⬜ Service-Container
### **Sprint 3 (Woche 3): Core-E-Commerce Features**
- ⬜ Produktvarianten
- ⬜ Produktbewertungen
- ⬜ Gutschein-/Rabatt-System
### **Sprint 4 (Woche 4): Kunden- & Versand-Features**
- ⬜ Kundenkonto-Features
- ⬜ Versandmethoden & Tracking
- ⬜ Benutzerverwaltung
### **Sprint 5 (Woche 5): Marketing & UX Features**
- ⬜ Cross-Selling & Zubehör
- ⬜ Produktvergleich
- ⬜ Wunschliste
- ⬜ E-Mail-Marketing
### **Sprint 6 (Woche 6): System-Features**
- ⬜ Lagerverwaltung
- ⬜ Berichte & Statistiken
- ⬜ Import/Export
### **Sprint 7 (Woche 7): Internationalisierung & Performance**
- ⬜ Mehrsprachigkeit (i18n)
- ⬜ Template-/Theme-System
- ⬜ Performance-Optimierung
### **Sprint 8 (Woche 8): Rechtliches & Tests**
- ⬜ Rechtliches & DSGVO
- ⬜ Social Media Integration
- ⬜ Affiliate-/Partner-System
- ⬜ PrestaShop-Module-Tests
---
## Bekannte PrestaShop-Module zum Testen
### **Einfache Module:**
- **blockreassurance** (Hooks: displayProductAdditionalInfo)
- **ps_mainmenu** (Hooks: displayTop, displayNav)
- **ps_shoppingcart** (Hooks: displayTop, displayNav)
### **Komplexe Module:**
- **ps_checkout** (Viele Hooks, Overrides)
- **ps_facebook** (API-Integration)
- **ps_cashondelivery** (Payment-Module)
---
## Technische Details
### **Hook-System Struktur:** ✅ IMPLEMENTIERT
```php
// Implementiert in app/Core/Hook.php
class Hook
{
private static $hooks = [];
public static function register($hookName, $moduleName, $callback)
{
self::$hooks[$hookName][] = [
'module' => $moduleName,
'callback' => $callback
];
}
public static function exec($hookName, $params = [])
{
$results = [];
if (isset(self::$hooks[$hookName])) {
foreach (self::$hooks[$hookName] as $hook) {
$results[] = call_user_func($hook['callback'], $params);
}
}
return $results;
}
}
```
### **Module-Base-Class:** ✅ IMPLEMENTIERT
```php
// Implementiert in app/Core/Module.php
abstract class Module
{
public $name;
public $tab;
public $version;
public $author;
public $need_instance;
abstract public function install();
abstract public function uninstall();
public function registerHook($hookName)
{
// Hook-Registration
}
public function unregisterHook($hookName)
{
// Hook-Unregistration
}
}
```
---
## Prioritäten für sofortige Implementierung
### **HOCH (nächste Woche):**
1. Override-System
2. Context-System
3. Service-Container
### **MITTEL (später):**
1. Module-Admin-Interface
2. Module-Dependencies
3. Performance-Optimierung
---
## Nächste Schritte
1. **Override-System implementieren** (Sofort)
2. **Context-System nachbauen** (Sofort)
3. **Einfaches Test-Modul entwickeln** (Validierung)
4. **Bekannte PrestaShop-Module testen** (Kompatibilität)
---
## Hinweise
- Die Reihenfolge kann je nach Nutzerwunsch angepasst werden.
- Nach jedem Sprint erfolgt ein Review und ggf. ein Merge/Push zu Gitea.
- Feature-Requests können jederzeit ergänzt werden.
- PrestaShop-Kompatibilität hat höchste Priorität für Module-Nutzung.
---
**Letzte Aktualisierung:** [TT.MM.JJJJ] Phase 2 Planung mit PrestaShop-Kompatibilität erstellt
**Aktueller Status:** Sprint 1 abgeschlossen, Sprint 2 in Arbeit