Request Quote

How to build eCommerce website using Laravel?

Building a Laravel eCommerce website requires a thorough understanding of the eCommerce ecosystem and right data workflows.

With that comes the use of the framework that should be easy to code, have wide community support and should be scalable.

Of all the PHP Frameworks, Laravel as of now is the most suited PHP Frameworks that one should use for their eCommerce shop.

Source: Acuity Software

However, with the complexity involved in developing the eCommerce framework, one should better use a combination of Open Source eCommerce Framework that is truly built on Laravel like Bagisto.

Bagisto is the next-gen eCommerce Framework that offers Multi-Warehouse Inventory out of the box

 

Here I am going to highlight how you easily set up your eCommerce Shop using Bagisto Laravel eCommerce package.

Bagisto — Laravel eCommerce

Bagisto is an Open Source eCommerce Framework built on tech stack comprising Laravel & Vue.js.

Live Demo – Bagisto

 

With the code-driven approach and the fully customisable structure, you can easily add/change anything and even deploy your code in Bagisto framework.

Prerequisites

  • OS: Ubuntu 16.04 LTS or higher or WAMP/XAMPP environment
  • Server: Apache 2 or NGINX
  • RAM: 2 GB or higher.
  • PHP: 7.1.17 or higher.
  • Processor: Clock Cycle 1Ghz or higher.
  • MySQL: 5.7.23 or higher.
  • Node: 8.11.3 LTS or higher.
  • Composer: 1.6.5 or higher.

Using Composer

Below we are going to describe how you can install bagisto using composer.

Configuration

Follow the below steps to configure Bagisto.

  • Downloading Bagisto

Open the SSH terminal and go to the specified folder. Run this Command to download the project on to your local machine or server

composer create-project bagisto/bagisto

In case, the composer is not installed in your system, you can run the composer commands, by downloading composer.phar file put in the root directory, then run the below command

php composer.phar create-project bagisto/bagisto

For downloadable zip file

In case you have downloaded the zip file, get inside the directory bagisto-master, then run the below command.

composer install
  • Setting .env Variables

Once the process has been executed, open the .env file using editors and set your .env variable, especially the ones below:

APP_URL
DB_CONNECTION
DB_HOST
DB_PORT
DB_DATABASE
DB_USERNAME
DB_PASSWORD

For downloadable zip file

If you have downloaded the zip file, you will get the .env.example file. Just make a copy of that file as .env

cp .env.example .env

and set all the .env variable as mentioned above. Once the variables have been set, generate the application key

php artisan key:generate

Installation

Run the commands to continue the installation process

Execute below command to create a migration table in the database as defined in your .env file

php artisan migrate

Now the database will be seeded with default data using seed classes.

php artisan db:seed

With the below command, your configuration, assets (CSS, js, images etc) and all necessary files will be copied to the specified publish location

php artisan vendor:publish
-> Press 0 and then press enter to publish all assets and configurations.

You should create a symbolic link of storage directory with the public using the below command so images will be publicly accessible

php artisan storage:link

This is the end of the installation process.

Installation Video

You can also go through with the video tutorial for the complete installation process.

Accessing Front-End

After successful installation, just need to hit the public folder

and the front page of your website will pop up in front of you.

Accessing Admin Panel

To access the admin panel of your shop, you can follow the below URL

http(s)://example.com/admin/login

And use the following credentials

email:admin@example.com
password:admin123

Using GUI Installer

In the new version recently launched, GUI Installer has been added, which has made the process of setting up your Bagisto eCommerce store much easier.

Kindly follow the below steps to install Bagisto using GUI Installer.

  1. After you have downloaded the Bagisto package and extracted that, go to the root directory of bagisto and run the below command to install dependencies of Bagisto.

  1. Once the dependencies have been installed, you need to click the public folder as there in the directory.
  2. The Bagisto installer will pop up in the next step where it will check for the minimum configuration as mentioned in the prerequisites. If everything is right, click Continue.
  3. In the next step, you need to fill the environment variables.  Save and Continue.App Name: Here you need to provide the name of your application or your eCommerce store.
    Database Name: Provide the name of the database that you have created for your store.
    Username: Here you need to provide the Database server username for a successful connection.
    Password: Provide the password for the database server.
  4.  Next, you need to click Migrate and Seed button to perform successful migration and loading test data in the tables.
  5. Once the Migration and Seeder operation is completed, click Continue.
  6. At last, you need to provide Admin details of your eCommerce store.
  7. Click Finish after the installation has been done and you will be redirected to Sign In Page where you can provide admin credentials to check the admin panel.

Conclusion

Above are the steps by which you can easily set up your Laravel eCommerce store Bagisto and modify as per your requirement.  As per their roadmap, new features will also be added like Multi-Vendor marketplace and Laravel POS System.

Bagisto Laravel POS

That is to say, the best thing with Bagisto is the simplicity and customisable structure by which you can easily customise the eCommerce Framework.

Moreover, the framework was developed by Webkul which has been the leader in crafting e-commerce extension and plugins for the past 10 years.

Let us know your feedback in comments below or If you are looking for any help regarding Bagisto Installation.

. . .

Comments (31)

Add Your Comment

  • Rendi
    i’m installing Bagisto version 0.1.0 on the server, but i have a problem.
    my server using apache2, ubuntu 14.04, and when i run phpinfo show that php version is php7.0.

    the problem is when i run http://your-host/folder-name/public/ :
    This page isn’t working.

    and when i look into lavavel error log, show :
    syntax error, unexpected const (T_CONST), expecting variable (T_VARIABLE) {“exception”:”[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): syntax error, unexpected const (T_CONST), expecting variable (T_VARIABLE) at /var/www/html/qupe-old/vendor/symfony/http-foundation/HeaderUtils.php:21)

    Exception thrown without a stack frame {“exception”:”[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 16): Exception thrown without a stack frame at Unknown:0)

    • saurav pathak
      Hi Rendi,

      Greetings for the day!!!

      At first, Bagisto requires PHP 7.1.7 or higher, please check this out for the minimum requirements: https://bagisto.com/en/download/ Try upgrading your PHP version and check. If you still got the issue, you can raise ticket at https://bagisto.uvdesk.com/en/

      • Rendi
        is it really the problem with the php version? because in my browser it doesn’t display an error message, only show this page is’nt working
        • saurav pathak
          I am just recommending you to start with the using the minimum requirements as needed for bagisto, then if the same error comes again, will let you know the alternative because usually, this error does not come.
          • Rendi
            i have other project in the server, because the reason i can’t upgrade to php7.1
          • saurav pathak
            I just checked on this, it’s because of the version. I recommend you to update the PHP version to use bagisto.
  • Ishak
    Hello me too i got this error :
    Notice: Undefined index: DB_HOST in C:\wamp64\www\bagisto\public\installer\install.php on line 36
    Undefined index: DB_USERNAME in C:\wamp64\www\bagisto\public\installer\install.php on line 37
    Undefined index: DB_PASSWORD in C:\wamp64\www\bagisto\public\installer\install.php on line 38
    • saurav pathak
      Hello Ishak,

      Greetings for the day!!!

      The issue as pointed by you has now been resolved. Please download the package from here and try installing via GUI Installer: https://github.com/bagisto/bagisto/tree/master

      This is, however, the master branch and testing are being performed. You can check if you want otherwise can wait for the official release which would be coming soon by next week. You can also check your .env file for the database credentials that you have provided.

      • Ronald Rios
        I resolved the issue changing the EOF method (from Unix to Windows) in the .env file. Even though I am using Windows, the file was coded as an Unix file when installed using composer.
        • Dhirar Amri
          Hi, I’m having this issue but I can’t seem to find the EOF method you refer to in my .env
          Are you sure that’s the correct place?
          • saurav pathak
            Hi Dhirar,

            Greetings for the day!!!

            May I know to which issue are you referring to. FYI, we have released the new version in which we have resolved installation bugs of the last release. Please download from here: https://bagisto.com/en/download/

  • Adli
    Hello I got this error.
    Notice: Undefined index: DB_HOST in D:\Project\Laravel\Toko\bagisto\public\installer\install.php on line 36

    Notice: Undefined index: DB_USERNAME in D:\Project\Laravel\Toko\bagisto\public\installer\install.php on line 37

    Notice: Undefined index: DB_PASSWORD in D:\Project\Laravel\Toko\bagisto\public\installer\install.php on line 38

    Notice: Undefined index: DB_DATABASE in D:\Project\Laravel\Toko\bagisto\public\installer\install.php on line 39

    Notice: Undefined index: DB_CONNECTION in D:\Project\Laravel\Toko\bagisto\public\installer\install.php on line 40

    Notice: Undefined index: DB_PORT in D:\Project\Laravel\Toko\bagisto\public\installer\install.php on line 41

    • saurav pathak
      Hi Adli,

      Greetings for the day!!!

      Please check the .env file regarding the information you have provided for the database connection again. Let me know if you come across any further issues.

  • Toyin
    Hello here
    am getting this error Undefined index: DB_HOST in C:\wamp64\www\bagisto\public\installer\install.php on line 36
  • Toyin
    i got this error during migration
    2 PDOException::(“SQLSTATE[HY000]: General error: 1025 Error on rename of ‘.
    \bagisto\attribute_group_mappings’ to ‘.\bagisto\#sql2-d3c-60’ (errno: 168 – Unk
    nown (generic) error from engine)”)
    • saurav pathak
      Here you need to enable the PDO and PDO_MYSQL extensions in your php.ini file or install it. You can also try to run this command sudo apt-get install pdo-mysql php5-mysql according to the PHP version that you are using.
  • Toyin
    am getting this error
    1 Doctrine\DBAL\Driver\PDOException::(“SQLSTATE[42S02]: Base table or view n
    ot found: 1146 Table ‘bagisto.categories’ doesn’t exist”)
    • saurav pathak
      Hi Toyin,
      Greetings for the day!!!

      Migration did not happen properly. Please try to create a new database and run the migrate command again.

      • Toyin
        Thank you so much Saurav pathak
        I restart my wamp server and the migration was fine.
        • saurav pathak
          Always a pleasure to help you.
  • Akshay dongare
    Hi I am facing problem while migrating.It throw below error,

    “Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘json null, `created_at` timestamp null, `updated_at` timestamp null)”

  • john diggle
    actually im trying to build website using bagisto
    but im unable to install it on windows
    • saurav pathak
      Hi John, I request you kindly install a new bagisto instance from here https://github.com/bagisto/bagisto/tree/master or you can wait for the few days. We are going to release the new version of Bagisto in which few of the windows installation issues has been resolved.
      • kishor
        i have tried but im unable to open gui and front end of bagisto
        could you provide any remote desktop support.
        please answer asap. i need to implement the project very urgently.
        • saurav pathak
          Hi Kishor,

          Greetings for the day!!!

          Please download the new version of bagisto from here https://bagisto.com/en/download/ and also do not forget to update the MariaDB version if using on Windows.

  • Rob Dana
    Installing on a macbook with Mysql installed by brew. Brew by default actually installs MariaDB which does not support JSON fields. Migrations where failing. I changed json fields to text to allow migrate. Might want to consider changing the JSON fields to text for wider adoption. I don’t believe there is any performance lost.
    • saurav pathak
      Hi Rob, I request you to kindly use the updated version of MariaDB which should be 10.2.7 or Higher for Bagisto that can support JSON fields. For more info, you can visit here: https://mariadb.com/kb/en/library/json-data-type/
      • Toyin
        am getting this error
        1 Doctrine\DBAL\Driver\PDOException::(“SQLSTATE[42S02]: Base table or view n
        ot found: 1146 Table ‘bagisto.categories’ doesn’t exist”)
        • saurav pathak
          Hi Toyin,

          Greetings for the day!!!

          Migration did not happen properly. Please try to create a new database and run the migrate command again.

  • css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close

    Index