Custom Oro Application 

No two businesses are alike. This motto is part of Oro’s product philosophy, which is why flexibility is one of the fundamental principles driving architecture. Depending on what you are planning to build, you can create your custom application with minimum functions starting with the OroCommerce application as a baseline.

Application Repository and Installation 

Before you start working on a new project, it is essential to have a version control system in place. The easiest way to start is to fork application repository of OroCommerce on GitHub.

Once code repository is ready, please follow installation instructions.

Note

A newly created application repository should be used instead of the https://github.com/oroinc/orocommerce-application.git

You can use development mode to work on customizations when your application is up and running. To warm up the application cache in development mode, please run:

php bin/console cache:clear --env=dev

To access the application in development mode, add index_dev.php to the base URL (example: http://orocommerce.example.com/index_dev.php).

Application Custom Code 

Oro application structure is based on Symfony Standard Edition and we highly recommend to follow Symfony Best Practices for any custom application you build on top OroCommerce.

In the root folder of your application, there is an src folder. Use it as a working directory for your custom project and put your custom code there. Like in Symfony applications, all custom code in the Oro application is organized in bundles - modules that group application functionality (see Symfony Bundle System for best practice of module structure and design).

Note

Please note that the Oro application has several differences compared to Symfony Standard Edition.

Typically, to create a custom application you may follow the typical steps:

  1. Create a bundle.

  2. Introduce new entity types that represent your business data structure and add related features.

  3. Customize existing functionality (menu, workflow, extend entities, etc.).

Application Deployment 

Oro applications are open source and can be deployed to on-premise environments. Deployment methods can vary depending on organization requirements and infrastructure. You can design your custom deployment process but make sure you follow the recommendations below:

  1. Follow the advice outlined in the Symfony Application Deployment documentation.

  2. Lock all dependencies with composer.lock before taking the code to production.

  3. Warm up the application cache in production mode.

  4. Disable access to index_dev.php.

  5. Configure crontab and run web socket server.

Oro applications are scalable.

Note

As an alternative to the on-premise deployment, when you create your application following recommendations above, you can deploy your application to OroCloud. Please get in touch with us for more information.