{"id":18353023,"url":"https://github.com/thecodeholic/yii2-ecommerce-website","last_synced_at":"2025-06-26T12:05:06.922Z","repository":{"id":41083166,"uuid":"312366425","full_name":"thecodeholic/yii2-ecommerce-website","owner":"thecodeholic","description":"E-commerce website with admin panel build on Yii2 framework","archived":false,"fork":false,"pushed_at":"2021-06-29T02:20:45.000Z","size":2165,"stargazers_count":186,"open_issues_count":2,"forks_count":59,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-12-05T17:10:43.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodeholic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T18:45:51.000Z","updated_at":"2024-11-07T08:24:36.000Z","dependencies_parsed_at":"2022-08-03T11:45:56.325Z","dependency_job_id":null,"html_url":"https://github.com/thecodeholic/yii2-ecommerce-website","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodeholic%2Fyii2-ecommerce-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodeholic%2Fyii2-ecommerce-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodeholic%2Fyii2-ecommerce-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodeholic%2Fyii2-ecommerce-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodeholic","download_url":"https://codeload.github.com/thecodeholic/yii2-ecommerce-website/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423559,"owners_count":18223435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T21:38:11.731Z","updated_at":"2024-12-19T11:10:38.276Z","avatar_url":"https://github.com/thecodeholic.png","language":"PHP","funding_links":["https://developer.paypal.com/demo/checkout/","https://developer.paypal.com/developer/applications/"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/yiisoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://avatars0.githubusercontent.com/u/993323\" height=\"100px\"\u003e\n    \u003c/a\u003e\n    \u003ch1 align=\"center\"\u003eYii2 E-commerce application\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\nYii2 E-commerce system\n\n\n## Features\n - Bootstrap 4\n - Custom [Admin template](https://startbootstrap.com/theme/sb-admin-2) in backend\n - Product Management\n - Implement cart page\n - Checkout for guests\n - Checkout for authorized users\n - Sending email when order is made\n - Payments with PayPal - [PayPal buttons](https://developer.paypal.com/demo/checkout/#/pattern/client)\n - Order validation\n - Display order in backend\n - Dashboard with basic statistics\n    - Total earnings\n    - Total products sold\n    - Total number of orders made\n    - Total users\n    - Earnings by day\n    - Revenue by country\n\n## Demo\n\nI am working on demo. It will be available soon.\n\n## Installation\n1. Clone the repository\n1. Go to the project root directory and run `composer install`\n1. Run `php init` from the project root directory and choose your desired environment\n1. Create the database\n1. Open `common/config/main-local.php`\n    - Configure database credentials by changing the following lines\n        ```php\n        'dsn' =\u003e 'mysql:host=localhost;dbname=your_website_db',\n        'username' =\u003e 'root',\n        'password' =\u003e '',\n        'charset' =\u003e 'utf8mb4',\n        ```\n    - If you want to use real SMTP credentials to send emails, configure the mail provider by replacing `mailer` component with the following code\n        ```php\n        'mailer' =\u003e [\n            'class' =\u003e 'yii\\swiftmailer\\Mailer',\n            'transport' =\u003e [\n                'class' =\u003e 'Swift_SmtpTransport',\n                'host' =\u003e 'SMTP_HOST',\n                'username' =\u003e 'SMTP_USERNAME',\n                'password' =\u003e 'SMTP_PASSWORD',\n                'port' =\u003e 'SMTP_PORT',\n                'encryption' =\u003e 'tls',\n            ],\n        ],\n        ```\n1. Run `php yii migrate` to apply all system migrations.\n1. Create virtual hosts for `frontend/web` and `backend/web` directories.\n    Virtual Host templates\n    ```\n    \u003cVirtualHost *:80\u003e\n        ServerName yii2-ecommerce.localhost\n        DocumentRoot \"/path/to/ecommerce-website/frontend/web/\"\n        \n        \u003cDirectory \"/path/to/ecommerce-website/frontend/web/\"\u003e\n            # use mod_rewrite for pretty URL support\n            RewriteEngine on\n            # If a directory or a file exists, use the request directly\n            RewriteCond %{REQUEST_FILENAME} !-f\n            RewriteCond %{REQUEST_FILENAME} !-d\n            # Otherwise forward the request to index.php\n            RewriteRule . index.php\n\n            # use index.php as index file\n            DirectoryIndex index.php\n\n            # ...other settings...\n            # Apache 2.4\n            Require all granted\n            \n            ## Apache 2.2\n            # Order allow,deny\n            # Allow from all\n        \u003c/Directory\u003e\n    \u003c/VirtualHost\u003e\n    \n    \n    \u003cVirtualHost *:80\u003e\n        ServerName backend.yii2-ecommerce.localhost\n        DocumentRoot \"/path/to/ecommerce-website/backend/web/\"\n        \n        \u003cDirectory \"/path/to/ecommerce-website/backend/web/\"\u003e\n            # use mod_rewrite for pretty URL support\n            RewriteEngine on\n            # If a directory or a file exists, use the request directly\n            RewriteCond %{REQUEST_FILENAME} !-f\n            RewriteCond %{REQUEST_FILENAME} !-d\n            # Otherwise forward the request to index.php\n            RewriteRule . index.php\n\n            # use index.php as index file\n            DirectoryIndex index.php\n\n            # ...other settings...\n            # Apache 2.4\n            Require all granted\n            \n            ## Apache 2.2\n            # Order allow,deny\n            # Allow from all\n        \u003c/Directory\u003e\n    \u003c/VirtualHost\u003e\n    ```\n1. Open `common/config/params-local.php` and replace the content with the following code\n    Make sure you [create PayPal application](https://developer.paypal.com/developer/applications/) and take ClientId and Secret.\n    ```php\n    \u003c?php\n    return [\n        'frontendUrl' =\u003e 'YOUR_FRONTEND_HOST', // Ex: http://yii2-ecommerce.localhost\n        'paypalClientId' =\u003e '',\n        'paypalSecret' =\u003e '',\n        'vendorEmail' =\u003e 'admin@yourwebsite.com'\n    ];\n    ```\n   \n## Building assets\nThe project uses webpack to build the assets.\u003cbr\u003e\nThe project styles and bootstrap styles are built together.\nSource files are located in `frontend/scss` and `backend/js`.\n\n#### Bootstrap customization\nIf you want to customize bootstrap variables, open `frontend/scss/bootstrap-variables.scss`\nand override any bootstrap variable.\u003cbr\u003e\nCheck [the following link](https://getbootstrap.com/docs/4.0/getting-started/theming/) for more information about bootstrap customization\n\n\n#### For Development\nRun`npm run dev` to build the files and start watching them. This will generate unminified versions of the files\nand will generate source maps as well\n\n#### For production\nRun `npm run prod` to build the files for production. This will generate minified files.\n\n    \n## Create admin user\nRun the following console command to create admin user. PASSWORD is optional, you can skip it and system will generate a random password\n```bash\nphp yii app/create-admin-user USERNAME [PASSWORD]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodeholic%2Fyii2-ecommerce-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodeholic%2Fyii2-ecommerce-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodeholic%2Fyii2-ecommerce-website/lists"}