JKR eShop System
JKR eShop System WordPress plugin
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/josephtsen/jkr-eshop-system/archive/refs/heads/main.zipA unified eShop management system that consolidates all JKR and KKCSI plugins into one comprehensive solution. This plugin provides a centralized platform for staff management, inventory control, order processing, email notifications, analytics, security, and more.
🚀 Features
Core System
- Unified Dashboard: Centralized management interface for all eShop operations
- Modular Architecture: Organized into logical modules for easy maintenance and extension
- Design System: Consistent UI/UX across all components with centralized styling
- Security Framework: Built-in security features and threat detection
- Performance Optimization: Caching, analytics, and performance monitoring
Staff Management
- Staff Dashboard: Comprehensive staff management interface
- Role-based Permissions: Granular permission system for different user roles
- Staff Analytics: Performance tracking and analytics for staff members
- Activity Monitoring: Real-time activity tracking and reporting
Inventory Management
- Stock Tracking: Real-time inventory management and tracking
- Collection Management: Specialized collection tracking system
- Low Stock Alerts: Automated notifications for low inventory
- Inventory Analytics: Detailed reporting and analytics
Order Management
- Order Processing: Streamlined order management workflow
- Approval System: Multi-level approval workflow for orders
- Order Analytics: Comprehensive order reporting and analytics
- Real-time Updates: Live order status updates
Branch Management
- Branch Dashboard: Dedicated interface for branch operations
- Branch Analytics: Performance metrics and reporting per branch
- Multi-branch Support: Manage multiple locations from one system
Email System
- Email Templates: Customizable email templates for notifications
- Email Analytics: Track email performance and delivery rates
- Automated Notifications: System-generated email notifications
- Email Logs: Comprehensive email activity logging
Analytics & Reporting
- Real-time Analytics: Live data visualization and reporting
- Performance Tracking: System performance monitoring
- Custom Reports: Generate custom reports and exports
- Data Visualization: Charts and graphs for data analysis
Integration
- WooCommerce Integration: Seamless integration with WooCommerce
- API Management: RESTful API for external integrations
- Mobile API: Mobile application support
- Third-party Integrations: Support for various third-party services
📁 Plugin Structure
jkr-eshop-system/
├── jkr-eshop-system.php # Main plugin file
├── README.md # This file
├── includes/ # PHP classes and modules
│ ├── core/ # Core system modules
│ │ ├── class-core-loader.php
│ │ ├── class-database-manager.php
│ │ ├── class-security-manager.php
│ │ ├── class-cache-manager.php
│ │ └── class-settings-manager.php
│ ├── design/ # Design system modules
│ │ ├── class-design-system.php
│ │ ├── class-theme-manager.php
│ │ └── class-component-library.php
│ ├── staff/ # Staff management modules
│ │ ├── class-staff-dashboard.php
│ │ ├── class-staff-analytics.php
│ │ └── class-staff-permissions.php
│ ├── inventory/ # Inventory management modules
│ │ ├── class-inventory-manager.php
│ │ ├── class-stock-tracker.php
│ │ └── class-collection-tracker.php
│ ├── orders/ # Order management modules
│ │ ├── class-order-manager.php
│ │ ├── class-order-processor.php
│ │ └── class-order-analytics.php
│ ├── branch/ # Branch management modules
│ │ ├── class-branch-manager.php
│ │ ├── class-branch-dashboard.php
│ │ └── class-branch-analytics.php
│ ├── email/ # Email system modules
│ │ ├── class-email-manager.php
│ │ ├── class-email-templates.php
│ │ └── class-email-notifications.php
│ ├── workflow/ # Approval workflow modules
│ │ ├── class-approval-workflow.php
│ │ ├── class-second-approval.php
│ │ └── class-workflow-analytics.php
│ ├── analytics/ # Analytics modules
│ │ ├── class-analytics-manager.php
│ │ ├── class-performance-tracker.php
│ │ └── class-real-time-analytics.php
│ ├── users/ # User management modules
│ │ ├── class-user-profiles.php
│ │ ├── class-user-permissions.php
│ │ └── class-user-analytics.php
│ └── integration/ # Integration modules
│ ├── class-woocommerce-integration.php
│ ├── class-api-manager.php
│ └── class-mobile-api.php
├── assets/ # Frontend assets
│ ├── css/ # Stylesheets
│ │ ├── design-system.css # Main design system
│ │ ├── admin.css # Admin-specific styles
│ │ ├── frontend.css # Frontend styles
│ │ ├── components.css # Component styles
│ │ ├── themes/ # Theme variations
│ │ │ ├── light.css
│ │ │ └── dark.css
│ │ └── rtl.css # RTL support
│ └── js/ # JavaScript files
│ ├── design-system.js # Design system functionality
│ ├── components.js # Component interactions
│ ├── admin.js # Admin functionality
│ └── frontend.js # Frontend functionality
├── templates/ # Template files
│ ├── admin/ # Admin templates
│ │ ├── main-dashboard.php
│ │ ├── staff-dashboard.php
│ │ ├── inventory-dashboard.php
│ │ ├── orders-dashboard.php
│ │ ├── branches-dashboard.php
│ │ ├── email-dashboard.php
│ │ ├── analytics-dashboard.php
│ │ └── settings.php
│ └── shortcodes/ # Shortcode templates
│ ├── dashboard.php
│ ├── header.php
│ ├── sidebar.php
│ └── stats.php
└── languages/ # Translation files
├── jkr-eshop-system.pot
├── jkr-eshop-system-en_US.po
└── jkr-eshop-system-en_US.mo
🛠 Installation
-
Upload the Plugin:
- Upload the
jkr-eshop-systemfolder to your/wp-content/plugins/directory - Or upload as a ZIP file through WordPress admin
- Upload the
-
Activate the Plugin:
- Go to WordPress Admin → Plugins
- Find "JKR eShop System" and click "Activate"
-
Configure Settings:
- Go to WordPress Admin → JKR eShop → Settings
- Configure your system preferences
-
Set Up Database:
- The plugin will automatically create necessary database tables
- Ensure your database user has CREATE TABLE permissions
⚙️ Configuration
System Requirements
- WordPress: 5.0 or higher
- PHP: 8.0 or higher
- MySQL: 5.7 or higher
- WooCommerce: 5.0 or higher (recommended)
Initial Setup
-
Database Tables: The plugin creates the following tables:
wp_jkr_eshop_staff- Staff managementwp_jkr_eshop_inventory- Inventory trackingwp_jkr_eshop_orders- Order managementwp_jkr_eshop_branches- Branch informationwp_jkr_eshop_analytics- Analytics data
-
User Roles: The plugin adds custom user roles:
jkr_staff- Basic staff memberjkr_manager- Branch managerjkr_admin- System administrator
-
Capabilities: Custom capabilities for fine-grained permissions
🎨 Design System
The JKR eShop System includes a comprehensive design system with:
Design Tokens
- Colors: Primary, secondary, success, warning, danger, info variants
- Typography: Font families, sizes, weights, and line heights
- Spacing: Consistent spacing scale (xs, sm, md, lg, xl)
- Border Radius: Standardized border radius values
- Shadows: Elevation system with multiple shadow levels
- Transitions: Consistent animation timing
Components
- Buttons: Multiple variants and sizes
- Cards: Flexible card components with headers, bodies, and footers
- Forms: Styled form controls with validation
- Tables: Responsive table components
- Modals: Modal dialogs and overlays
- Navigation: Menu and navigation components
Themes
- Light Theme: Default light color scheme
- Dark Theme: Dark mode support
- RTL Support: Right-to-left language support
📊 Usage
Shortcodes
The plugin provides several shortcodes for easy integration:
// Main dashboard
[jkr_eshop_dashboard type="main"]
// Header component
[jkr_eshop_header show_notifications="true" show_user_info="true"]
// Sidebar navigation
[jkr_eshop_sidebar show_navigation="true" show_quick_actions="true"]
// Statistics display
[jkr_eshop_stats type="overview" branch_id="" period="today"]
// Design components
[jkr_design_card title="Card Title" content="Card content" type="primary"]
[jkr_design_button text="Click Me" type="primary" href="#"]
[jkr_design_modal title="Modal Title" content="Modal content"]
API Endpoints
The plugin provides REST API endpoints:
GET /wp-json/jkr-eshop-system/v1/stats
GET /wp-json/jkr-eshop-system/v1/orders
GET /wp-json/jkr-eshop-system/v1/inventory
GET /wp-json/jkr-eshop-system/v1/staff
Hooks and Filters
The plugin provides numerous hooks for customization:
// Actions
do_action('jkr_eshop_system_init');
do_action('jkr_eshop_system_update_analytics_cache');
// Filters
apply_filters('jkr_eshop_system_dashboard_stats', $stats);
apply_filters('jkr_eshop_system_user_permissions', $permissions);
🔧 Development
Adding Custom Modules
To add a custom module:
- Create a new class in the appropriate directory under
includes/ - Follow the naming convention:
JKR_EShop_Module_Name - Register the module in the core loader
- Create corresponding templates if needed
Customizing Styles
To customize the design system:
- Override CSS variables in your theme
- Use the provided utility classes
- Extend the component library with custom components
Extending Functionality
The plugin is designed to be extensible:
- Use the provided hooks and filters
- Extend existing classes
- Add custom shortcodes
- Create custom API endpoints
🚨 Security
The plugin includes several security features:
- Nonce Verification: All AJAX requests are protected with nonces
- Capability Checks: All admin functions check user capabilities
- Data Sanitization: All user input is properly sanitized
- SQL Prepared Statements: Database queries use prepared statements
- Rate Limiting: API endpoints include rate limiting
- Threat Detection: Built-in threat detection system
📈 Performance
The plugin is optimized for performance:
- Caching: Multiple levels of caching (object, transients, database)
- Asset Optimization: Minified and optimized CSS/JS files
- Database Optimization: Efficient queries and indexing
- Lazy Loading: Components load only when needed
- CDN Support: Assets can be served from CDN
🐛 Troubleshooting
Common Issues
-
Plugin Not Activating:
- Check PHP version (requires 8.0+)
- Check WordPress version (requires 5.0+)
- Check file permissions
-
Database Errors:
- Ensure database user has CREATE TABLE permissions
- Check for conflicting table names
- Verify database connection
-
Styling Issues:
- Clear browser cache
- Check for theme conflicts
- Verify CSS files are loading
-
JavaScript Errors:
- Check browser console for errors
- Verify jQuery is loaded
- Check for plugin conflicts
Debug Mode
Enable debug mode for detailed error information:
// Add to wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
📝 Changelog
Version 1.0.0
- Initial release
- Consolidated all JKR and KKCSI plugins
- Unified design system
- Modular architecture
- Comprehensive dashboard
- Staff management system
- Inventory management
- Order processing
- Email system
- Analytics and reporting
- Security framework
- Performance optimization
🤝 Contributing
We welcome contributions to the JKR eShop System:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
This plugin is licensed under the GPL v2 or later.
🆘 Support
For support and documentation:
- Documentation: [Link to documentation]
- Support Forum: [Link to support forum]
- Email Support: support@kkcsi.com
- GitHub Issues: [Link to GitHub issues]
🙏 Acknowledgments
- WordPress community for the excellent platform
- WooCommerce team for the eCommerce foundation
- All contributors and beta testers
- KKCSI team for the original plugins
JKR eShop System - Unified eShop Management Solution Developed by KKCSI