Webkul opencart console application is used to automate the opencart installation, module creation, clearing the cache files and database import/export via console commands.
Clone this project over the directory where you will keep your opencart root setup.
Before using this app, you must have opencart installed (not for the opencart installer console) on your server and composer on your system. If composer is not installed on your system then run the following commands-
- Syntax: curl -s http://getcomposer.org/installer | php
- Syntax: php composer.phar install
- After successfully installation of composer, you will see "vendor" and "composer.phar" directory and file (PHP Archive).
Please follow the instruction to use this with opencart platform.
-
Put app and src folder and composer.json file on your installation root
-
Open your command/terminal and go to your desired installation directory
-
To download run command [composer install] and if you have made any changes to in your composer.json file for version then run command [composer update]
-
After the composer is installed successfully, now you can use the console commands by following below instruction.
This console command is used to install the opencart on your system
By using this console app you can create Opencart setup for the 2.x.x.x,3.x.x.x versions.
- Step 1: Execute the following command on console
- Syntax: app/console setup:install-opencart
- Step 2: Required values e.g hostname, username, etc so either you can enter manually or pass with command.
- Step 2: Enter required options.
- Manual Syntax: --manual=1 You will be asked to enter each values.
- Automatic Syntax: --db_hostname=localhost --db_username=root --db_password=root --db_database=console --db_port=80 --db_prefix=oc_ --username=admin --password=admin --email=[email protected] --http_server=http://127.0.0.1/opencart-install/ --oc_version=2.3.0.2 --destination=/path/of-the-your/opencart-setup
- Step 3: If all the options are valid then required opencart will be downloaded and installed.
- Step 4: You will get your store and admin url with success message.
This console command is used to create skeleton of the basic module file structure on admin and catalog as well.
run command [app/console generate:module] and answer the questions and at last your extension will be ready, which you can see at your admin side and now you can start writing your logic for particular extension.
This console command is used to export/import sql from/on the opencart database.
command : php app/console app:oc-sql oc_tables
command : php app/console app:oc-sql export all
command : php app/console app:oc-sql export table_name
command : php app/console app:oc-sql import table_name
Note : For import table we put the sql file inside the sql_import folder
and export command file will be in sql_export folder
This console command is used to clear the cache of your project using the command mentioned below.
Run the command
- app/console clearcache
This console command is used to create dummy data for Customer, Order, Product, Category.
command : php app/console app:dummy-data create-product
command : php app/console app:dummy-data create-customer
command : php app/console app:dummy-data create-category
command : php app/console app:dummy-data create-order
This project is still under process. There are some command need to add.
1.0.0.0 .
- Webkul Software Private Limited (https://webkul.com) -
This project is licensed under the Webkul Software Private Limited License - see the LICENSE.md file for details
- This project is using symfony bundle to create commands (https://github.com/symfony/console)