Learn about EC-CUBE

Tram Ho

To meet the needs of developing e-commerce websites, personal blogs … there have been many CMS source codes released, strong support for web development and management becomes easier. One of the famous CMS like WordPress, Wix, Shopify, … Today we have a little bit of change to learn about other CMS besides these famous CMS. And I chose EC-CUBE.

What do you know about EC-CUBE?

  • EC-CUBE is an open source CMS developed by Japan to address the issue of e-commerce. Here is the home page of it
  • EC-CUBE is written in PHP, the documents on EC-CUBE are few and mostly Japanese
  • Currently EC-CUBE has version 4.0 after more than years of development.

How to use EC-CUBE

Currently, there are many EC-CUBE repos of different versions, including 2 accounts containing EC-CUBE repositories, one is Japanese ( here ) and one is Vietnamese ( here ).

For your convenience, I will use Vietnamese repo in this post.

Setting

1) Setup environment
  • Server server: Apache
  • PHP version 7.1.3 => <7.3
  • Package manager: npm, node js
  • Database:
    • Mysql version 5.5.x / 5.6.x / 5.7.x
    • SQLite version 3.x
    • PostgreSQL version 9.2.x / 10.x
  • Some libraries for PHP:
    • gsql / mysqli (which matches the database you want to use)
    • Pdo_pgsql / Pdo_mysql / Pdo_sqlite (which matches the database you want to use)
    • PDO
    • Phar
    • mbstring
    • Zlib
    • CTYPE
    • JSON
    • Xml
    • libxml
    • OpenSSL
    • Zip
    • CURL
    • FileInfo
    • Intl

During the installation of the project, if there is no library, the system will shoot an error for everyone to know and install more, so I do not place heavy problems on the environment installation. ? .

2) Installation

As mentioned at the beginning of the article I will use Vietnamese repo .

  • First mn clone repo this Vietnamese on
  • Next cd into the project folder just clone, eg cd ec-cube-vn
  • Run composer install to install the packages included in the project: At this step, if your machine lacks some libraries for PHP, it will get an error with the following cases:
    • Some errors missing PHP library: then I just need to search the library and install the correct version of PHP, for example, my computer lacks cURL for php, and I use php 7.2, fix it by running the command sudo apt install php7.2-curl then restart apache sudo server apache2 restart . Mn does the same for other packages.
    • Some system-specific errors such as facebook/webdriver 1.6.0 requires ext-curl , mn only need to add the --ignore-platform-reqs option after composer i , composer i --ignore-platform-reqs .
  • There are 2 options for everyone to choose from to complete the installation:
    • Install using command line: bin/console eccube:install
    • Install by browser:
      • Run the server bin/console server , access the server at the link in the terminal, usually http://127.0.0.1:8000 or http://localhost:8000/
      • The screen appears as below, you have successfully installed it:

      • Click next

      • Click next then you fill in the information as shown below: remember the username and password of the administrator to log into the system administrator offline ? , also in the name of the directory to access is the name of the admin directory, mn whatever you set. ex: manage, the url to access the admin will be localhost: 8000 / manager. Then click next

      • In this screen I set up the database for the system: In the database name section, mn must create a db first and fill in here, and user_name, password is mysql’s username ?

      • Now click next to start initializing csdl ?
      • If you come here, then I have successfully setup ? . Click Truy cập phần quản trị to Truy cập phần quản trị site.
      • The admin part has many typical functions of a CMS

      • To access the user interface, visit the URL: http://localhost:8000

Functional support

  • EC-CUBE supports many other functions such as product management, orders, users …
  • Install additional plugins
  • Upload or custom theme
  • There are some other functions, but if you have time, you can dig deeper.

References

End

Through this article I hope you can know a new CMS and how to use it. The article just stops at a basic level so to understand more and more in depth, please make more scratches ?

Happy coding ??

Chia sẻ bài viết ngay

Nguồn bài viết : Viblo