E-commerce website with admin panel build on Yii2 framework
E-commerce website with admin panel build on Yii2 framework
Yii2 E-commerce application
Yii2 E-commerce system
I am working on demo. It will be available soon.
composer installphp init from the project root directory and choose your desired environmentcommon/config/main-local.php'dsn' => 'mysql:host=localhost;dbname=your_website_db',
'username' => 'root',
'password' => '',
'charset' => 'utf8mb4',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',
],
],php yii migrate to apply all system migrations.frontend/web and backend/web directories.
Virtual Host templates…common/config/params-local.php and replace the content with the following code
Make sure you create PayPal application and take ClientId and Secret. 'YOUR_FRONTEND_HOST', // Ex: http://yii2-ecommerce.localhost
'paypalClientId' => '',
'paypalSecret' => '',
'vendorEmail' => '[email protected]'
];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.
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
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
Run npm run prod to build the files for production. This will generate minified files.
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]No open issues yet, or sync has not completed.