• Stars
    star
    182
  • Rank 211,154 (Top 5 %)
  • Language
    PHP
  • License
    BSD 3-Clause "New...
  • Created about 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

E-commerce website with admin panel build on Yii2 framework

Yii2 E-commerce application


Yii2 E-commerce system

Features

  • 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
  • Dashboard with basic statistics
    • Total earnings
    • Total products sold
    • Total number of orders made
    • Total users
    • Earnings by day
    • Revenue by country

Demo

I am working on demo. It will be available soon.

Installation

  1. Clone the repository
  2. Go to the project root directory and run composer install
  3. Run php init from the project root directory and choose your desired environment
  4. Create the database
  5. Open common/config/main-local.php
    • Configure database credentials by changing the following lines
      'dsn' => 'mysql:host=localhost;dbname=your_website_db',
      'username' => 'root',
      'password' => '',
      'charset' => 'utf8mb4',
    • If you want to use real SMTP credentials to send emails, configure the mail provider by replacing mailer component with the following code
      'mailer' => [
          'class' => 'yii\swiftmailer\Mailer',
          'transport' => [
              'class' => 'Swift_SmtpTransport',
              'host' => 'SMTP_HOST',
              'username' => 'SMTP_USERNAME',
              'password' => 'SMTP_PASSWORD',
              'port' => 'SMTP_PORT',
              'encryption' => 'tls',
          ],
      ],
  6. Run php yii migrate to apply all system migrations.
  7. Create virtual hosts for frontend/web and backend/web directories. Virtual Host templates
    <VirtualHost *:80>
        ServerName yii2-ecommerce.localhost
        DocumentRoot "/path/to/ecommerce-website/frontend/web/"
        
        <Directory "/path/to/ecommerce-website/frontend/web/">
            # use mod_rewrite for pretty URL support
            RewriteEngine on
            # If a directory or a file exists, use the request directly
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            # Otherwise forward the request to index.php
            RewriteRule . index.php
    
            # use index.php as index file
            DirectoryIndex index.php
    
            # ...other settings...
            # Apache 2.4
            Require all granted
            
            ## Apache 2.2
            # Order allow,deny
            # Allow from all
        </Directory>
    </VirtualHost>
    
    
    <VirtualHost *:80>
        ServerName backend.yii2-ecommerce.localhost
        DocumentRoot "/path/to/ecommerce-website/backend/web/"
        
        <Directory "/path/to/ecommerce-website/backend/web/">
            # use mod_rewrite for pretty URL support
            RewriteEngine on
            # If a directory or a file exists, use the request directly
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            # Otherwise forward the request to index.php
            RewriteRule . index.php
    
            # use index.php as index file
            DirectoryIndex index.php
    
            # ...other settings...
            # Apache 2.4
            Require all granted
            
            ## Apache 2.2
            # Order allow,deny
            # Allow from all
        </Directory>
    </VirtualHost>
    
  8. Open common/config/params-local.php and replace the content with the following code Make sure you create PayPal application and take ClientId and Secret.
    <?php
    return [
        'frontendUrl' => 'YOUR_FRONTEND_HOST', // Ex: http://yii2-ecommerce.localhost
        'paypalClientId' => '',
        'paypalSecret' => '',
        'vendorEmail' => '[email protected]'
    ];

Building assets

The project uses webpack to build the assets.
The project styles and bootstrap styles are built together. Source files are located in frontend/scss and backend/js.

Bootstrap customization

If you want to customize bootstrap variables, open frontend/scss/bootstrap-variables.scss and override any bootstrap variable.
Check the following link for more information about bootstrap customization

For Development

Runnpm run dev to build the files and start watching them. This will generate unminified versions of the files and will generate source maps as well

For production

Run npm run prod to build the files for production. This will generate minified files.

Create admin user

Run the following console command to create admin user. PASSWORD is optional, you can skip it and system will generate a random password

php yii app/create-admin-user USERNAME [PASSWORD]

More Repositories

1

php-developer-roadmap

This is PHP Developer Roadmap
3,548
star
2

laravel-vue-ecommerce

E-commerce project with Laravel and Vue.js
PHP
583
star
3

php-mvc-framework

PHP MVC Framework
PHP
467
star
4

laravel-vue-survey

This is a full stack application of Vue 3 with Tailwindcss 3 and Laravel 8
PHP
325
star
5

php-crash-course-2020

PHP
238
star
6

lobibox

Responsive jQuery notification plugin
JavaScript
200
star
7

lobipanel

jQuery plugin for bootstrap panels. It extends panels with several common and useful functions.
JavaScript
168
star
8

deno-websocket-chat

Realtime Chat App with Deno and WebSockets
JavaScript
130
star
9

laravel11-react-spa

Laravel 11 + React SPA with Inertia for managing projects and Tasks.
JavaScript
126
star
10

Yii2-Youtube-Clone

Youtube clone made with Yii2 framework
PHP
126
star
11

laravel-react-starter

PHP
124
star
12

laravel-file-manager

PHP
120
star
13

laravel-10-blog

Laravel 10 blog starter kit
PHP
112
star
14

tc-php-mvc-core

PHP
101
star
15

PHPCourse2020

Materials for PHP Course 2020
PHP
82
star
16

laravel-social-media-website

Social Media website starter project built with Laravel and inertiajs with Vue3
PHP
80
star
17

laravel-react-survey

PHP
74
star
18

yii2-blog-api

PHP
74
star
19

tailwindcss-ecommerce

E-commerce website template files built with tailwindcss
HTML
68
star
20

lobilist

LobiList is TODO list jquery plugin
JavaScript
67
star
21

livewire-projects

Beginner friendly livewire projects
PHP
65
star
22

vue-meals-app

Vue
60
star
23

PHP-OOP-Projects

This repository contains OOP projects with PHP
PHP
59
star
24

laravel-image-manipulation-rest-api

This is an image manipulation REST API written in PHP Laravel Framework
PHP
58
star
25

laravel9-tailwind-portfolio

JavaScript
58
star
26

lobiadmin

Responsive bootstrap admin panel
JavaScript
52
star
27

PHPSimpleCRUD-FS

Simple PHP CRUD application with data saved in JSON file
PHP
50
star
28

alpinejs-course

Source code files for Alpine.js YouTube Course
HTML
44
star
29

vue.js-yii2-notes

Notes application using VueJs on frontend side and Yii2 Rest API on backend
PHP
39
star
30

laravel11-crash-course

The source code for YouTube Tutorial, Laravel 11 Crash Course
PHP
39
star
31

freecodecamp-deno-course

Freecodecamp Deno Course source files
TypeScript
32
star
32

deno-login-register

Registration & Login with Deno
TypeScript
27
star
33

deno-mongodb-rest-api

REST API with Deno and oak reading and writing data from MongoDB
TypeScript
27
star
34

laravel-ecommerce-website

E-commerce website using Laravel, Tailwindcss and Alpine.js
JavaScript
24
star
35

php-file-watcher

Watch file or folder and execute code when something is changes inside
PHP
22
star
36

vanilla-js-projects

Practical projects around vanillajs
JavaScript
21
star
37

VanillaJsNotes

Sticky notes app using vanilla javascript
JavaScript
21
star
38

deno-survey

Survey Application made with Deno
TypeScript
21
star
39

stripe-checkout-laravel

Stripe online payments checkout process full flow implementation in Laravel
PHP
21
star
40

php8.0-changes

PHP
20
star
41

webpack-starter-kit

Webpack 4 starter kit project. Features: Bootstrap 4, ES6, SASS, Image optimization, HMR
JavaScript
18
star
42

deno-jwt-auth-example

Example repository which show how you can use JWT authentication in Deno Oak framework
TypeScript
17
star
43

php8.1-changes

PHP
15
star
44

JsPicturePuzzle

Javascript Picture Puzzle game
JavaScript
14
star
45

Yii2CrashCourse

PHP
14
star
46

yii2-best-practices

This repository contains best practices and recommendations about Yii2 framework
13
star
47

PHPCartOOP

PHP
10
star
48

yii2-course

PHP
10
star
49

chatgpt-bash

Shell
8
star
50

laravel-example

PHP
7
star
51

VueSocketIoChat

JavaScript
7
star
52

vuejs-survey

Vue
7
star
53

yii2-basic-bootstrap4

Yii2 Basic application with Bootstrap 4 integration
PHP
6
star
54

deno-serve-static-files

Sample package which shows how you can serve static files in Deno.
TypeScript
6
star
55

react-vue-comparison

This repo contains the source code for the exact same application built in react an vue.js
JavaScript
6
star
56

lobiadmin-vuejs

Bootstrap4 VueJs Admin Template
CSS
5
star
57

yii2-admin-template

JavaScript
4
star
58

yii2-grapesjs

Yii2 GrapesJs AssetBundle, Actions and module
JavaScript
4
star
59

jasny-bootstrap-angular

JavaScript
4
star
60

PHP_namespaces

PHP
3
star
61

lobiadmin-bootstrap3-vuejs

Bootstrap 3 VueJs admin template
CSS
3
star
62

Angular-Lobiadmin

Angular 1.x admin panel - based on Lobiadmin
CSS
3
star
63

reddit-clone-deno

Reddit clone application using Vue.js and Deno
TypeScript
3
star
64

vuejs-projects

In this repository you will find vuejs project examples
Vue
3
star
65

laravel11-reverb-testing

PHP
3
star
66

javascript-course

Source code for Javascript course
3
star
67

BulkImageResize

Resize all images inside specific folder
PHP
3
star
68

SimplePHPFramework

PHP
2
star
69

reddit-clone-vue

Vue
2
star
70

vue-gif-search-app

Vue
2
star
71

node-rest-invoicing-app

JavaScript
2
star
72

Lobiadmin-nodejs

Admin template on nodejs starter project
JavaScript
2
star
73

lobilist2

Lobilist - jQuery todo plugin
JavaScript
1
star
74

JSHTMLTableCellEditing

HTML Table cell editing plugin
JavaScript
1
star
75

lobilist-angularjs

JavaScript
1
star
76

lobiadmin-bootstrap3

Bootstrap 3 admin template.
CSS
1
star
77

yii2-grapesjs-demo

PHP
1
star
78

yii2-album

Create, update, delete albums for logged in users. Upload, edit, delete Images inside your albums. Add captions to your albums and images
1
star
79

Angular4-Lobiadmin

CSS
1
star
80

GitCrashCourse

HTML
1
star
81

lobilist-angular

Lobilist angular
JavaScript
1
star
82

lobipanel-angularjs

JavaScript
1
star