Free, open-source software for e-commerce websites
composer create-project gp247/s-cart
Homepage | Demo | Documentation | FB Group
(Vietnamese version: README_vi.md)
S-Cart is the best free e-commerce website project for individuals and businesses, built on the GP247 ecosystem (the Laravel Framework) and the latest technologies.
Our mission is "Effective and friendly for everyone":
- Effective: meets even the smallest customer requirements.
- Friendly: easy to use, easy to maintain, easy to extend.
- Everyone: businesses, individuals, developers, students.
S-Cart 2.x:
Backed by the GP247 ecosystem https://github.com/gp247net
Core Laravel framework 13.x https://github.com/laravel/laravel
UI built with Tailwind CSS 4
- Plugin packages built on the HMVC pattern
- Command-line upgrades and patches for S-Cart
- Full documentation for developers and customers
- Multi-language
- Multi-currency
- Full e-commerce feature set:
- Shopping cart management
- Order management
- Product management
- Customer management
- CMS content management:
- Categories
- News
- Content pages
- Extensions:
- Payment plugins
- Shipping methods
- Discount system
- Tax calculation
- Professional plugins for S-Cart:
- Multi-vendor: https://gp247.net/en/docs/s-cart/multi-vendor.html
- Multi-store: https://gp247.net/en/docs/s-cart/multi-store.html
- Developer resources:
- Online marketplace for plugins and templates
- Secured API support for apps and mobile integrations
- User management:
- Role-based permissions (admin, manager, marketing, etc.)
- Comprehensive security with full audit logging
- Access control, authentication, and CAPTCHA
- Business tools:
- Product management
- Order processing
- Customer management
- Analytics and reporting
- Activity tracking
Website-folder/
|
βββ app
β βββ GP247
β βββ Core(+) //Override Core controllers
β βββ Helpers(+) //Auto-loads Helpers/*.php into the system
β βββ Front(+) //Override GP247/Front controllers
β βββ Shop(+) //Override GP247/Shop controllers
β βββ Plugins(+) //Generated by `php artisan gp247:make-plugin --name=NameOfPlugin`
β βββ Templates(+) //Generated by `php artisan gp247:make-template --name=NameOfTempate`
βββ public
β βββ GP247
β βββ Core(+)
β βββ Plugins(+)
β βββ Templates(+)
βββ resources
β βββ views/vendor
β βββ gp247-admin(+) //Core view overrides
β βββ gp247-shop-admin(+) //Shop view overrides
β βββ gp247-front-admin(+) //Front view overrides
βββ vendor
β βββ gp247/core
β βββ gp247/front
β βββ gp247/shop
βββ...
1. Create the project
composer create-project gp247/s-cart2. Check your .env configuration
Make sure the database settings are correct. If APP_KEY is not set yet,
generate it with:
php artisan key:generate3. Install S-Cart
php artisan sc:install4. Install sample data (optional)
php artisan sc:sample1. Clone the repository
git clone https://github.com/gp247net/s-cart.git
cd s-cart2. Create .env and install dependencies
cp .env.example .env
php artisan key:generate
composer install3. Configure the database in .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password4. Install S-Cart
php artisan sc:install
php artisan sc:sample # optional, sample dataNo need to install PHP/Composer/MySQL on your machine β Docker is all you need. There are two clearly separate compose files for dev and prod β always use the right one for the environment:
docker-compose.ymlβ dev environment (your local machine)docker-compose.prod.ymlβ prod environment (your server)
DEV setup:
git clone https://github.com/gp247net/s-cart.git
cd s-cart
cp .env.example .env
docker compose up -d --build
docker compose exec app php artisan key:generate
docker compose exec app php artisan sc:install
docker compose exec app php artisan sc:sample # optionalOpen the site: http://localhost:8000
PROD setup:
git clone https://github.com/gp247net/s-cart.git
cd s-cart
cp .env.example .env
# Configure .env for prod: APP_ENV, DB_*, WWWUSER/WWWGROUP β see DOCKER.md
docker compose -f docker-compose.prod.yml up -d --build
docker compose -f docker-compose.prod.yml exec app php artisan key:generate
docker compose -f docker-compose.prod.yml exec app php artisan sc:install
docker compose -f docker-compose.prod.yml exec app php artisan sc:sample # optional
docker compose -f docker-compose.prod.yml run --rm node # build CSS/JS assets-f docker-compose.prod.yml on prod β forgetting it
accidentally applies the dev config (debug mode on, runs as root, installs
Xdebug...). See the Q&A in DOCKER.md for that failure mode in
detail.
For the full step-by-step guide and a detailed troubleshooting Q&A covering both dev and prod, see DOCKER.md.
If you installed with Method 1 or 2 (no Docker), make sure the following folders are writable, otherwise installation and various features won't work correctly:
app/GP247public/GP247public/vendorresources/views/vendorstoragevendor
(Only available when S-Cart is installed directly, not via the component-by-component method)
php artisan sc:infoUpdate each package with Composer:
composer update gp247/core
composer update gp247/front
composer update gp247/shopThen run (only available when S-Cart is installed directly):
php artisan sc:updatephp artisan gp247:make-plugin --name=PluginNameAlso generate a zip file for distribution:
php artisan gp247:make-plugin --name=PluginName --download=1php artisan gp247:make-template --name=TemplateNameAlso generate a zip file for distribution:
php artisan gp247:make-template --name=TemplateName --download=1php artisan vendor:publish --tag=config-lfmEach package publishes its admin views into its own views/vendor/<namespace>
folder β publish only the tag you actually need to override:
php artisan vendor:publish --tag=gp247:core-view # -> views/vendor/gp247-admin
php artisan vendor:publish --tag=gp247:front-admin # -> views/vendor/gp247-front-admin
php artisan vendor:publish --tag=gp247:shop-view-admin # -> views/vendor/gp247-shop-adminAdd --force if you need to overwrite files already published there.
php artisan vendor:publish --tag=gp247:front-view # -> app/GP247/Templates/GP247Front
php artisan vendor:publish --tag=gp247:front-public # -> public/GP247/Templates/GP247Front
php artisan vendor:publish --tag=gp247:shop-view-front # -> app/GP247/Templates/GP247FrontAdd --force if you need to overwrite files already published there.
- Add the list of functions you want to override to
config/gp247_functions_except.php - Create new PHP files containing the new functions in
app/GP247/Helpers, e.g.app/GP247/Helpers/myfunction.php
S-Cart lets you override any controller (including API controllers) in
GP247/Core, GP247/Front, and GP247/Shop using the same mechanism:
create the corresponding controller in app/GP247/{Core|Front|Shop},
extend the original controller, and prepend App to the original
namespace.
Example, overriding a Core controller:
- Create the matching file under
app/GP247/Core/Controllers/...(keep the same sub-path and filename as in the original package). - Make the new controller
extendthe original controller fromvendor/gp247/core/.... - Change the namespace from
GP247\Core\ControllerstoApp\GP247\Core\Controllers(just prependApp, keep the rest as-is).
The same pattern applies to GP247\Front\* and GP247\Shop\* (becoming
App\GP247\Front\* and App\GP247\Shop\*) and to API controllers
(GP247\Core\Api\Controllers becomes App\GP247\Core\Api\Controllers).
Use the GP247_ADMIN_PREFIX and GP247_ADMIN_MIDDLEWARE prefix/middleware
constants in your route declarations.
Reference: https://github.com/gp247net/core/blob/master/src/routes.php
Disable the API:
GP247_API_MODE=1 // set to 0 to disableDatabase table prefix (cannot be changed after gp247 is installed):
GP247_DB_PREFIX=gp247_Admin page path prefix:
GP247_ADMIN_PREFIX=gp247_admin

