Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Y

yii2-ecommerce-website

> 编程语言
Open source

E-commerce website with admin panel build on Yii2 framework

192 stars0 likes0 views
WebsiteGitHub

About

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
      php
      '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
      php
      '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
…
  1. 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
     '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

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言