- π Introduction
- β¨ Features
- π Getting Started
- Prerequisites
- Installation Steps
-
- Clone the Repository
-
- Database Setup
-
- Configure Database Connection
-
- Place Project Files
-
- π‘ Usage
- Admin Panel
- Customer Tracking Interface
- π Project Structure
- π οΈ Customization
- π Security Considerations
- π£οΈ Future Enhancements
- π Troubleshooting
- π€ Contributing
- π License
- π Contact
Welcome to OrderEase, a straightforward yet effective web-based tracking management system built with PHP and MySQL. This application is designed to streamline the process of managing and tracking product deliveries or service statuses. It offers a clean administrative interface for businesses to add and update tracking information, alongside a user-friendly public portal where customers can easily track their orders using a unique ID.
OrderEase prioritizes simplicity, ease of use, and a professional aesthetic, making it an ideal solution for small to medium-sized businesses looking for a quick and efficient tracking solution.
OrderEase comes packed with essential features to get your tracking system up and running:
- Unique Tracking IDs: Effortlessly create and assign custom, unique tracking IDs (e.g.,
ORD123,SHIP789) to each order or service. - Comprehensive Order Details: Store all vital information for every tracking entry:
- Customer Information: Full name and complete address.
- Product Details: Track multiple products per order, including their respective quantities.
- Financials: Record the total price of the order.
- Timestamps: Log the order date and automatically update a "last updated" timestamp on any modification.
- Intuitive Status Management:
- Payment Status: Clearly define the payment state (
Pending,Paid,Refunded). - Delivery Status: Monitor the entire delivery journey (
Pending,Processing,Shipped,Out for Delivery,Delivered,Cancelled).
- Payment Status: Clearly define the payment state (
- Dedicated Admin Panel: A secure (once authentication is implemented) interface for administrators to seamlessly add new tracking records and update existing ones with ease.
- User-Friendly Customer Interface: A simple, public-facing page where customers can input their tracking ID to instantly view the real-time status of their order.
- Modern & Professional UI: A clean, responsive, and visually appealing design crafted with HTML, CSS, and dynamic JavaScript, ensuring a smooth user experience.
- Visual Icons: Integrated Font Awesome icons provide clear, instant visual cues for various statuses and data points, enhancing clarity and engagement.
Follow these steps to get OrderEase up and running on your local machine or a web server.
Before you begin, ensure you have the following installed:
- Web Server: Apache or Nginx
- PHP: Version 7.4 or higher (with
mysqliextension enabled) - MySQL / MariaDB: Database server (e.g., MySQL 8.0+)
- Composer (Optional but Recommended): For dependency management, though not strictly required for this basic setup.
- A Local Development Environment: (e.g., XAMPP, WAMP, MAMP) is highly recommended for local setup.
Start by cloning the OrderEase repository to your local machine:
git clone https://github.com/khdxsohee/OrderEase.git-
Access Database: Open your preferred MySQL client (e.g., phpMyAdmin, MySQL Workbench, or your command line).
-
Create Database: Create a new database. We'll name it
tracking_dbfor consistency.CREATE DATABASE IF NOT EXISTS `tracking_db`; USE `tracking_db`;
-
Create Table: Execute the following SQL query to create the
tracking_itemstable:CREATE TABLE `tracking_items` ( `id` INT AUTO_INCREMENT PRIMARY KEY, `tracking_id` VARCHAR(20) UNIQUE NOT NULL, `customer_name` VARCHAR(255) NOT NULL, `customer_address` TEXT NOT NULL, `products` TEXT NOT NULL, -- Stores JSON string of products and quantities `price` DECIMAL(10, 2) NOT NULL, `order_date` DATE NOT NULL, `last_updated` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `payment_status` ENUM('Pending', 'Paid', 'Refunded') DEFAULT 'Pending', `delivery_status` ENUM('Pending', 'Processing', 'Shipped', 'Out for Delivery', 'Delivered', 'Cancelled') DEFAULT 'Pending' );
-
Navigate into your cloned project directory:
cd OrderEase -
Open the
db_config.phpfile using a text editor. -
Update the database credentials (
$servername,$username,$password,$dbname) to match your MySQL setup.<?php // db_config.php $servername = "localhost"; $username = "root"; // Your MySQL username $password = ""; // Your MySQL password (empty if none for root in local setup) $dbname = "tracking_db"; // The database you created // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $conn->set_charset("utf8mb4"); // Ensures proper character encoding ?>
Security Warning: For local development, using
rootwith an empty password might be common. However, for any production environment, it is CRITICAL to use strong, unique passwords and dedicated, restricted database users.
- Move the entire
OrderEaseproject folder into your web server's document root.- XAMPP:
C:\xampp\htdocs\ - WAMP:
C:\wamp\www\ - MAMP:
/Applications/MAMP/htdocs/ - Other Servers: Consult your server's documentation.
- XAMPP:
The admin panel allows you to add and update tracking records. For a live deployment, it is highly recommended to implement a robust authentication system to secure these pages.
-
Access Admin Dashboard (Conceptual):
- Once deployed, navigate to
http://localhost/OrderEase/admin_dashboard.php(you would need to create this file based on the previous documentation's suggestion to list all items).
- Once deployed, navigate to
-
Adding a New Tracking Item:
- Go to
http://localhost/OrderEase/admin_add.php. - Fill in the order details, including product names and quantities (you can add multiple product rows dynamically).
- Select the Payment Status and Delivery Status.
- Click "Add Item".
- Go to
-
Updating a Tracking Item:
- Typically, you'd navigate from an admin listing page (e.g.,
admin_dashboard.php) to the update page. - Access
http://localhost/OrderEase/admin_update.php?tracking_id=YOUR_TRACKING_ID(replaceYOUR_TRACKING_IDwith an actual ID, e.g.,BBB236). - The form will pre-fill with existing data, including product details.
- Make your desired changes and click "Update Item".
- Typically, you'd navigate from an admin listing page (e.g.,
This is the public-facing portal for your customers.
- Track Your Order:
- Visit
http://localhost/OrderEase/track.php. - Enter the unique Tracking ID provided to the customer.
- Click "Track Order".
- The system will display a modern, clear view of the order's current details, including payment and delivery statuses with intuitive icons.
- Visit
OrderEase/tracking-system
βββ admin_add.php # Admin page to add new tracking entries
βββ admin_update.php # Admin page to update existing tracking entries
βββ admin_dashboard.php # Admin page to update existing tracking entries
βββ admin_delete.php # Admin page to update existing tracking entries
βββ db_config.php # Database connection configuration
βββ track.php # Customer-facing page to input tracking ID
βββ view_tracking.php # Customer-facing page to display tracking details
βββ style.css # Global CSS styles for the application
βββ readme.md # Admin page to update existing tracking entries
You can easily customize OrderEase to fit your specific needs:
- Styling: Modify
style.cssto change colors, fonts, layout, and overall visual appearance. - Status Options: Edit the
ENUMvalues in thetracking_itemstable (via SQL) and update the<select>options inadmin_add.phpandadmin_update.phpto add or remove payment/delivery statuses. - Icons: Change or add new Font Awesome icons by referencing their library.
- Data Fields: Add new columns to the
tracking_itemstable and integrate them into the PHP forms and display pages.
While OrderEase provides core functionality, it's a basic setup. For production environments, consider these crucial security enhancements:
- Authentication: Implement a proper admin login system for
admin_add.php,admin_update.php, andadmin_dashboard.php. Use secure password hashing (password_hash,password_verify). - Prepared Statements: Replace
mysqli_real_escape_string()with prepared statements for all database queries to fully prevent SQL injection. - Input Validation: Implement robust server-side validation for all form inputs to ensure data integrity and prevent malicious submissions.
- Error Reporting: Disable
display_errorsinphp.inion live servers to prevent sensitive information from being exposed in error messages. Use proper error logging instead. - HTTPS: Always use HTTPS to encrypt data in transit.
We envision several enhancements to make OrderEase even more powerful:
- Admin Dashboard: A dedicated page to list, search, filter, and manage all tracking records.
- Delete Functionality: Add the ability for admins to delete tracking entries.
- User Management: Allow for multiple admin users with different roles.
- Tracking History/Timeline: Display a detailed log of status changes for each order.
- Email/SMS Notifications: Automated alerts for status updates to customers.
- API Endpoints: Create simple RESTful API endpoints for integration with other systems.
- Advanced Reporting: Generate reports based on delivery statuses, payment statuses, etc.
- Better UI/UX for Products: Implement a more user-friendly way to add/edit products for many items, possibly with auto-suggestions.
If you encounter any issues, please refer to these common solutions:
- "Connection failed" error:
- Verify your database credentials in
db_config.php. - Ensure your MySQL server is running.
- Verify your database credentials in
- PHP errors:
- Check your web server's error logs.
- Ensure all PHP files are in the correct directory.
- JavaScript (Add/Remove Product) buttons not working:
- Open your browser's developer console (F12) and check the "Console" tab for JavaScript errors.
- Ensure the JavaScript code is correctly placed within
<script>tags at the end ofadmin_add.phpandadmin_update.php.
- Products not pre-filling in
admin_update.php:- Check the browser console for JS errors.
- Verify the
productscolumn in your database contains valid JSON data.
- Icons not displaying:
- Confirm the Font Awesome CDN link is correctly included in the
<head>section oftrack.phpandview_tracking.php. - Check your internet connection if loading from CDN.
- Confirm the Font Awesome CDN link is correctly included in the
Contributions are welcome! If you have suggestions for improvements, feature requests, or find bugs, please feel free to:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-nameorbugfix/your-bug-fix). - Make your changes.
- Commit your changes (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature/your-feature-name). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or inquiries, please reach out to:
GitHub: khdxsohee