🏗️ Major Architectural Changes
- ISSUE #73 CRITICAL: Complete migration from custom table to Dolibarr standard constants
- MAJOR CHANGE: Configuration now stored in
llx_const
instead of llx_shopify_dolibarr_storedetails
- NEW CLASS:
ConfigurationMigrator
for automatic migration and backward compatibility
- AUTO MIGRATION: Automatic migration on first access with fallback to old table if needed
- 42 PARAMETERS: All configuration parameters migrated to Dolibarr constants with proper naming
- MULTI-ENTITY: Improved multi-entity support using Dolibarr standard mechanisms
🔧 Enhanced Diagnostics and Monitoring
- MIGRATION COUNTER: Migration status display in rights checker (X/42 parameters)
- VISUAL INDICATORS: Badges for complete/partial/non-migrated configuration
- DETECTION: Old configuration table presence reporting for cleanup guidance
- STATISTICS:
getConfigurationStats()
method for detailed monitoring
- LOGGING: Comprehensive migration process and error logging
📊 Files Migrated to Constants System
- admin/setup.php: All saves now use
dolibarr_set_const()
- admin/diagnostic.php: Configuration reading via
ConfigurationMigrator
- admin/sync_products.php: Configuration checks via constants
- class/importcollections.class.php:
loadConfiguration()
modernized
- class/collectionsconflictresolver.class.php:
loadConfiguration()
modernized
- class/shopifyordermanager.class.php: Historical import dates via constants
- lib/shopifyintegration.lib.php: Admin tabs via constants
🛡️ Backward Compatibility & Security
- ZERO BREAKING CHANGES: Automatic fallback to old table if constants missing
- SEAMLESS MIGRATION: No user intervention required
- FAIL-SAFE: If migration fails, system continues using old table
- AUTOMATIC: Migration runs on first access after update
- REVERSIBLE: Old table preserved until manual cleanup
🐛 Critical Fixes (2025-08-29)
- CRITICAL FIX: ConfigurationMigrator was falsely showing "30/42 parameters migrated"
- CRITICAL FIX: Migration now properly handles `0` values (excluded by previous `!empty()` condition)
- CRITICAL FIX: Added missing translations for UserRightsCheck interface (5 languages)
- FIX: Product synchronization checkboxes now display correctly based on migrated constants
- FIX: Migration statistics now accurately count only the 42 mapped parameters
- FIX: Product synchronization options (prices, descriptions, images, stocks, attributes) properly migrated
🚀 Interface Improvements (2025-08-29)
- NEW: Force migration button in diagnostic interface for incomplete migrations (< 42 parameters)
- NEW: Automatic Shopify API connection test with rights verification on page load
- NEW: Unified diagnostic interface combining all verification functionalities
- NEW: Complete translations added for all new diagnostic features (14 keys × 5 languages = 70 translations)
- ENHANCED: Diagnostic page now includes migration status, rights check, and API connectivity in single view
- IMPROVED:
forceMigration()
method to re-migrate all parameters even if already present
- IMPROVED:
testShopifyConnection()
method with GraphQL shop query and scope detection
- REMOVED: Separate rights_check.php tab - functionality integrated into main diagnostic
🩺 User Rights Diagnostic System (2025-08-31)
- ISSUE #74 NEW: Complete user rights verification system for support acceleration
- NEW CLASS:
ShopifyRightsChecker
for comprehensive permissions analysis
- REAL-TIME VERIFICATION: Checks 15+ required Dolibarr rights (products, orders, invoices, stocks, admin)
- CRITICAL/OPTIONAL DISTINCTION: Missing critical rights = red, missing optional = orange
- VISUAL INDICATORS: Automatic color coding (green/orange/red)
- IMPACT ANALYSIS: Detailed impact for each missing right with corrective guidance
- MULTILINGUAL SUPPORT: Compatibility via data-* attributes (FR/EN/DE/ES/IT)
- UNIFIED INTEGRATION: All checks in single admin/diagnostic.php page
🔧 Major Diagnostic Interface Improvements (2025-08-31)
- CRITICAL FIX: HTML structure corrected - "Configuration Status" section properly closed
- CRITICAL FIX: JavaScript detection via data-* attributes instead of language-dependent text
- CRITICAL FIX: User rights calculation using correct data structure (
status['current']
vs status['status']
)
- NEW: Collapsible sections with automatic expand/collapse based on status
- NEW: Visual color coding with CSS classes (has-success, has-warning, has-error)
- NEW: Complete consistency between displayed values and JavaScript calculations
- ENHANCED: Auto-collapse success sections, auto-expand warnings/errors
- IMPROVED: Shopify connection test with detailed scopes analysis (required vs optional)
🎯 Benefits: Performance (native Dolibarr caching), Standards (convention compliance), Multi-entity (improved support), Maintenance (no more custom table), Debugging (Dolibarr tools integration), Future-proof (prepared for future versions)