Abstract
Yii2 Ecommerce Website is an open-source Full Stack Web Development project. E-commerce website with admin panel build on Yii2 framework. It is built using PHP. Key capabilities include: Bootstrap 4; Custom Admin template in backend; Product Management. The complete source code is publicly available on GitHub under the BSD 3-Clause "New" or "Revised" License, making it a useful reference for students building a Full Stack Web Development mini project or final-year project.
1. Introduction
E-commerce website with admin panel build on Yii2 framework
2. Objective
E-commerce website with admin panel build on Yii2 framework
This project demonstrates how PHP can be applied to a real-world Full Stack Web Development problem.
3. Key Features / Modules
- Bootstrap 4
- Custom Admin template in backend
- Product Management
- Implement cart page
- Checkout for guests
- Checkout for authorized users
- Sending email when order is made
- Payments with PayPal - PayPal buttons
- Order validation
- Display order in backend
4. Technology Stack
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- PHP 7.4+ with a web server (XAMPP / WAMP / LAMP)
- MySQL / MariaDB
- phpMyAdmin (optional)
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/thecodeholic/yii2-ecommerce-website.git
cd yii2-ecommerce-website- Clone the repository
- Go to the project root directory and run composer install
- Run php init from the project root directory and choose your desired environment
- Create the database
- Open common/config/main-local.php
- Configure database credentials by changing the following lines
- If you want to use real SMTP credentials to send emails, configure the mail provider by replacing mailer component with the following code
- Run php yii migrate to apply all system migrations.
'dsn' => 'mysql:host=localhost;dbname=your_website_db',
'username' => 'root',
'password' => '',
'charset' => 'utf8mb4','mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'SMTP_HOST',
'username' => 'SMTP_USERNAME',
'password' => 'SMTP_PASSWORD',
'port' => 'SMTP_PORT',
'encryption' => 'tls',
],
],<?php
return [
'frontendUrl' => 'YOUR_FRONTEND_HOST', // Ex: http://yii2-ecommerce.localhost
'paypalClientId' => '',
'paypalSecret' => '',
'vendorEmail' => 'admin@yourwebsite.com'
];Full setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Add role-based access control
- Deploy on a VPS or cPanel hosting with a custom domain
- Add automated tests and a CI pipeline
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- Explain the frontend, backend and database layers of this application.
- How is user authentication and authorisation implemented?
- Describe the main database tables / collections and their relationships.
- Which REST APIs or routes are exposed and what do they return?
- How would you deploy this application to production?
9. Source Code & License
This project is developed by thecodeholic and published on GitHub under the BSD 3-Clause "New" or "Revised" License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on a Full Stack Web Development project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Full Stack Web Development Internship