How to install S-Cart

Requirements:

Version 2.0 ~ 2.2.x

- PHP >= 7.1.3
- 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 need not use composer to installing)
Step 2: Make sure the directories and its subdirectories are writable: public/documents/website, storage
Step 3: Create a new database
Step 4: Then, access link your-domain.com/install.php
(If installing with link "install.php" unsuccessful, you can install it manually below.)
OR manual installation:
- Import file sql database/s-cart.sql to database.
- Rename file .env.example to .env if file .env not exist.
- Genarate API key if APP_KEY is null. Use command "php artisan key:generate"
- 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_URL=system_admin (Path to admin)
Step 5: NOTE - Please remove or rename file public/install.php so others cannot access it.

You can also install S-cart by using composer or git:

(Guid: https://github.com/lanhktc/s-cart)
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: public/documents/website, storage
- Folder contain thumbnail  is public/documents/website/thumb.
Note: The directory structure in "public/documents/website/thumb" must be the same as "public/documents/website"
- Make sure the virtual host of the website points to the public directory.
- Link admin: your-domain/system_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

If you use the share-host service, please contact the vendor to install the Laravel website (S-cart's Platforms).