How to install S-Cart

Version 3.3

Requirements:

- PHP >= 7.2.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension

Installation:

  • Step 1: Download full version  here (Included vendor, so no need use composer)
S-Cart-folder/
├── app
├── databases
├── public
│     ├── index.php
│     └── install.php
├── resources
└──...
  • Step 2: Make sure the directories and its subdirectories are writable: storage,  vendor, public/data
  • Step 3: Create a new database
  • Step 4: Create virtual host, then point domain to folder s-cart-folder/public
  • Step 5: Then, access link your-domain.com/install.php
  • Step6: Please remove or rename file public/install.php so others cannot access it.
  • Video guide: HERE
(If installing with link "install.php" unsuccessful, you can install it manually below.)
OR manual installation:
- Step1: Create database, then import file .sql in folder database to database.
- Step2: Rename or delete file public/install.php
- Step3: Copy file .env.example to .env if file .env not exist.
- Step4: Generate API key if APP_KEY is null. 
  Use command "php artisan key:generate"
- Step5: Config value of file .env:
APP_DEBUG=false (Set "false" is security)
DB_HOST=127.0.0.1 (Database host)
DB_PORT=3306 (Database port)
DB_DATABASE=s-cart (Database name)
DB_USERNAME=root (User name use database)
DB_PASSWORD= (Password connect to database)
APP_URL=http://localhost (Your url)
ADMIN_PREFIX=sc_admin (Path to admin)

You can also install S-cart by using composer:

composer create-project lanhktc/s-cart

From git

git clone https://github.com/lanhktc/s-cart.git
Move to folder s-cart, run command "composer install" to install  vendors

Configuration

- Make sure the directories and its subdirectories are writable: vendor, storage, public/data
- Make sure the virtual host of the website points to the public directory.
- Link admin: your-domain/sc_admin. User/pass default admin/admin.

Setup on server

(*)Please make sure your virtual host points to s-cart's "public" directory. You can refer to the vhost configuration as below:
For websever Nginx
server {
        listen 80;
        root /home/domain/you-domain.com/public/;
        index index.php index.html index.htm;
        server_name your-domain.com;
        location / {
                try_files $uri $uri/ /index.php?$query_string;
        }
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}
For websever Apache
    ServerAdmin your-domain.com
    DocumentRoot "C:\xampp\htdocs\s-cart/public"
    ServerName your-domain.com
Guide for share-host service HERE.