Platform e-commerce modern untuk penjualan fashion vintage dan preloved dengan sistem manajemen produk, pesanan, dan customer yang lengkap.
- Andre Abdilillah Ahwien - andreabdilillah67@gmail.com
- Gilang Ramadhan - gilangg.rmdhn189@gmail.com
- Fitur Utama
- Teknologi
- Persyaratan Sistem
- Instalasi & Setup
- Konfigurasi
- Penggunaan
- Struktur Folder
- Troubleshooting
- Keamanan
- Lisensi
- β Registrasi dan login dengan verifikasi email OTP
- β Browse dan search produk vintage/preloved
- β Shopping cart dengan validasi stok real-time
- β Checkout dengan multiple payment methods
- β Manajemen profil dan multiple shipping addresses
- β Real-time order tracking dengan timeline
- β Notifikasi pesanan (in-app notifications)
- β Recently viewed products
- β Contact support system
- β Dashboard dengan statistik lengkap (revenue, orders, customers)
- β Manajemen produk (CRUD dengan multiple images upload)
- β Manajemen pesanan dan update status
- β Manajemen customer (view, block/unblock)
- β Konfirmasi pembayaran dengan preview bukti transfer
- β Update tracking pesanan dengan detail lokasi
- β Auto-generate tracking number dan courier assignment
- β Export reports (coming soon)
- β Responsive design (mobile, tablet, desktop)
- β Modern toast notifications (no alert popups)
- β Custom confirmation modals
- β Smooth animations dan transitions
- β Loading states dan skeleton screens
- β Image lazy loading
- β Form validation real-time
- PHP 8.0+ (OOP & Procedural)
- MySQL/MariaDB 5.7+ (Relational Database)
- PHPMailer 6.x (Email Service)
- Composer (Dependency Management)
- HTML5 (Semantic Markup)
- CSS3 (Custom Design System)
- JavaScript (Vanilla JS, ES6+)
- SVG Icons (Custom Icons)
- Apache 2.4+ (Web Server)
- .htaccess (URL Rewriting)
- PHP: 8.0 atau lebih tinggi
- MySQL: 5.7+ atau MariaDB 10.4+
- Apache: 2.4+ dengan mod_rewrite enabled
- Composer: 2.x
- RAM: 512 MB minimum
- Storage: 500 MB minimum
- mysqli
- mbstring
- openssl
- json
- curl
- gd (untuk image processing)
- PHP: 8.1+
- MySQL: 8.0+
- RAM: 1 GB+
- Storage: 1 GB+
git clone https://github.com/ahwine/retroloved.git
cd retrolovedcomposer installBuka phpMyAdmin atau MySQL CLI:
CREATE DATABASE retroloved CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;Via phpMyAdmin:
- Pilih database
retroloved - Klik tab "Import"
- Pilih file
backup/retroloved.sql - Klik "Go"
Via Command Line:
mysql -u root -p retroloved < backup/retroloved.sqlEdit file config/database.php:
$host = 'localhost';
$username = 'root'; // Ganti dengan username MySQL Anda
$password = ''; // Ganti dengan password MySQL Anda
$database = 'retroloved';Edit file config/email.php:
define('SMTP_HOST', 'smtp.gmail.com');
define('SMTP_USERNAME', 'your-email@gmail.com');
define('SMTP_PASSWORD', 'your-app-password'); // Gunakan App Password untuk Gmail
define('SMTP_PORT', 587);Cara Membuat Gmail App Password:
- Buka Google Account Settings
- Security β 2-Step Verification
- App passwords β Generate new password
- Copy password dan paste ke config
Windows (XAMPP):
- Folder sudah otomatis memiliki permission yang benar
Linux/Mac:
chmod 755 assets/images/products
chmod 755 assets/images/profiles
chmod 755 backupMenggunakan XAMPP:
- Copy folder
retrolovedkeC:\xampp\htdocs\ - Start Apache dan MySQL di XAMPP Control Panel
- Buka browser:
http://localhost/retroloved
Menggunakan PHP Built-in Server:
php -S localhost:8000Buka browser: http://localhost:8000
URL: http://localhost/retroloved/admin
Username: admin
Password: 123
Email: admin@retroloved.com
Jika Anda ingin setup manual, ikuti langkah berikut:
git clone https://github.com/ahwine/retroloved.gitcd retroloved
composer install# Buat database
mysql -u root -p -e "CREATE DATABASE retroloved CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
# Import database
mysql -u root -p retroloved < backup/retroloved.sql# Jika menggunakan example files
cp config/database.example.php config/database.php
cp config/email.example.php config/email.phpEdit config/database.php dan config/email.php sesuai environment Anda.
chmod -R 755 assets/images
chmod -R 755 backupphp -S localhost:8000File: config/database.php
<?php
// Database connection settings
$host = 'localhost';
$username = 'root';
$password = '';
$database = 'retroloved';
// Timezone
date_default_timezone_set('Asia/Jakarta');File: config/email.php
<?php
// SMTP Configuration
define('SMTP_HOST', 'smtp.gmail.com');
define('SMTP_USERNAME', 'your-email@gmail.com');
define('SMTP_PASSWORD', 'your-app-password');
define('SMTP_PORT', 587);
define('SMTP_SECURE', 'tls');
// Email Settings
define('FROM_EMAIL', 'noreply@retroloved.com');
define('FROM_NAME', 'RetroLoved');File: config/shipping.php
- Konfigurasi kurir dan layanan pengiriman
- Auto-generate tracking number
- Auto-assign courier driver
URL: http://localhost/retroloved/admin
Username: admin
Password: 123
Email: admin@retroloved.com
Anda bisa membuat akun customer baru melalui halaman register.
- Register β Verifikasi email dengan OTP
- Browse Products β Lihat katalog produk
- Add to Cart β Tambahkan produk ke keranjang
- Checkout β Isi data pengiriman dan pilih payment
- Upload Payment Proof β Upload bukti transfer
- Track Order β Pantau status pesanan real-time
- Login β Akses admin panel
- Dashboard β Lihat statistik dan overview
- Manage Products β Tambah/edit/hapus produk
- Manage Orders β Konfirmasi payment, update status
- Manage Customers β Lihat data customer, block jika perlu
- Update Tracking β Update lokasi dan status pengiriman
retroloved/
βββ admin/ # Admin panel
β βββ dashboard.php # Dashboard dengan statistik
β βββ products.php # Manajemen produk
β βββ product-add.php # Tambah produk baru
β βββ product-edit.php # Edit produk
β βββ orders.php # Manajemen pesanan
β βββ order-detail.php # Detail pesanan
β βββ customers.php # Manajemen customer
βββ assets/ # Static assets
β βββ css/ # Stylesheets
β β βββ style.css # Main stylesheet
β β βββ admin.css # Admin styles
β β βββ toast.css # Toast notification styles
β βββ js/ # JavaScript files
β β βββ script.js # Main script
β β βββ toast.js # Toast notifications
β β βββ modal.js # Modal dialogs
β β βββ confirm-modal.js # Confirmation modals
β βββ images/ # Images
β βββ products/ # Product images
β βββ profiles/ # Profile pictures
βββ auth/ # Authentication
β βββ process-auth.php # Login/Register handler
β βββ logout.php # Logout handler
β βββ check-availability.php # Username/email checker
βββ backup/ # Database backups
β βββ retroloved.sql # Database schema & data
βββ config/ # Configuration files
β βββ database.php # Database config
β βββ email.php # Email config
β βββ shipping.php # Shipping config
βββ customer/ # Customer panel
β βββ cart.php # Shopping cart
β βββ checkout.php # Checkout page
β βββ orders.php # Order history
β βββ order-detail.php # Order detail & tracking
β βββ product-detail.php # Product detail page
β βββ profile.php # Customer profile
β βββ notifications.php # Notifications
βββ includes/ # Reusable components
β βββ header.php # Header component
β βββ footer.php # Footer component
β βββ shipping-selection.php # Shipping selector
β βββ tracking-timeline.php # Order tracking timeline
βββ vendor/ # Composer dependencies
βββ .gitignore # Git ignore file
βββ .htaccess # Apache config
βββ composer.json # Composer config
βββ index.php # Homepage
βββ shop.php # Shop page
βββ faq.php # FAQ page
βββ how-it-works.php # How it works page
βββ privacy-policy.php # Privacy policy
βββ terms-conditions.php # Terms & conditions
βββ shipping-delivery.php # Shipping info
βββ size-guide.php # Size guide
βββ process-contact-support.php # Contact form handler
βββ cleanup-files.bat # Cleanup utility (Windows)
βββ reset-database.bat # Database reset utility (Windows)
βββ reset-database-safe.sql # Database reset script
βββ INSTALL.md # Installation guide
βββ PRE-LAUNCH-CHECKLIST.md # Pre-launch checklist
βββ README.md # This file
Penyebab: Database tidak terkoneksi
Solusi:
- Pastikan MySQL/MariaDB sudah running
- Cek konfigurasi di
config/database.php - Pastikan database
retrolovedsudah dibuat - Cek username dan password MySQL
# Cek MySQL status (Linux/Mac)
sudo systemctl status mysql
# Cek MySQL status (Windows XAMPP)
# Buka XAMPP Control Panel, pastikan MySQL runningPenyebab: Folder tidak memiliki write permission
Solusi:
Windows:
- Klik kanan folder
assets/images/products - Properties β Security
- Edit β Users β Allow "Write"
Linux/Mac:
chmod -R 755 assets/images
chown -R www-data:www-data assets/images # Untuk ApachePenyebab: Konfigurasi SMTP salah atau firewall blocking
Solusi:
- Pastikan konfigurasi di
config/email.phpbenar - Untuk Gmail, gunakan App Password bukan password biasa
- Cek firewall tidak memblokir port 587
- Test dengan script sederhana:
<?php
require 'vendor/autoload.php';
require 'config/email.php';
$result = EmailHelper::send(
'test@example.com',
'Test Email',
'This is a test email'
);
echo $result ? 'Email sent!' : 'Email failed!';Penyebab: PHP error atau missing extension
Solusi:
- Enable error display di
php.ini:
display_errors = On
error_reporting = E_ALL- Cek PHP error log:
# Linux/Mac
tail -f /var/log/apache2/error.log
# Windows XAMPP
# Lihat di: C:\xampp\apache\logs\error.log- Pastikan PHP extensions aktif:
php -m | grep mysqli
php -m | grep mbstring
php -m | grep opensslPenyebab: Composer tidak terinstall atau network issue
Solusi:
- Install Composer: https://getcomposer.org/download/
- Update Composer:
composer self-update- Clear cache dan retry:
composer clear-cache
composer installPenyebab: SQL syntax error atau charset issue
Solusi:
- Pastikan MySQL version minimal 5.7
- Set charset saat import:
mysql -u root -p --default-character-set=utf8mb4 retroloved < backup/retroloved.sql- Atau via phpMyAdmin, pilih charset:
utf8mb4_unicode_ci
-- Login ke MySQL
UPDATE users SET password = MD5('password_baru_yang_kuat') WHERE username = 'admin';Edit config/database.php:
$username = 'retroloved_user'; // Jangan gunakan root
$password = 'password_yang_kuat_dan_random';Edit php.ini atau .htaccess:
display_errors = Off
log_errors = On
error_log = /path/to/error.log# .htaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]# Linux/Mac
chmod 644 config/*.php
chmod 755 assets/images# Setup cron job untuk backup otomatis
0 2 * * * mysqldump -u root -p retroloved > /backup/retroloved_$(date +\%Y\%m\%d).sqlcomposer updateTambahkan di .htaccess:
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-XSS-Protection "1; mode=block"- Register akun baru β Cek email OTP
- Login β Cek session
- Browse products β Cek pagination
- Add to cart β Cek cart count
- Checkout β Cek order creation
- Upload payment β Cek file upload
- Admin: Confirm payment β Cek status update
- Track order β Cek timeline
# Windows
reset-database.bat
# Manual via phpMyAdmin
# Import file: reset-database-safe.sql- β Initial release
- β Customer registration dengan email OTP
- β Product management dengan multiple images
- β Shopping cart dan checkout
- β Order tracking dengan timeline
- β Admin dashboard dengan statistik
- β Payment confirmation system
- β Notification system
- β Responsive design
Contributions are welcome! Jika Anda ingin berkontribusi:
- Fork repository ini
- Buat branch baru (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add some AmazingFeature') - Push ke branch (
git push origin feature/AmazingFeature) - Buat Pull Request
Project ini dibuat untuk keperluan pembelajaran dan portfolio.
Untuk pertanyaan, bug report, atau feature request:
-
Andre Abdilillah Ahwien
- Email: andreabdilillah67@gmail.com
- GitHub: @ahwine
-
Gilang Ramadhan
- Email: gilangg.rmdhn189@gmail.com
- PHPMailer untuk email service
- Font Awesome untuk icons (jika digunakan)
- Inspiration dari berbagai e-commerce platforms
RetroLoved - Vintage Fashion, Modern Style ποΈ
Made with β€οΈ by Andre & Gilang