SlideShare a Scribd company logo
1 of 34
Download to read offline
Developer Training
Customizing OroCRM
Developer Training
Goals
- Overview of OroCRM customization
techniques
- Demonstrate implementation of customer
requirements
- Share best practices
Developer Training
Customization requirements
- Account should be accessible from top level
menu
- Edit B2bCustomer details from Account
page
- Add invoice entity and link it to the Account
- Bypass the datetime setting automatically
for Contact, if it’s already set
- Add employee_count to Account
Developer Training
Introduction
In general, the same customization methods
applied to OroCRM, as to raw Symfony application.
These includes: overriding controllers, views,
services. Though some OroCRM specific differences
exist.
Developer Training
Manually Auto Generate
- create directory structure app/console generate:bundle
- add bundle class
Clear cache afterwards:
app/console cache:clear
Adding new bundle
New bundle
Developer Training
Minimal structure
Bundle folder AcmeBundle, located in:
src/Scope/Bundle, where Scope - company, dep., etc
AcmeBundle
- Resources
- config
- oro
- bundles.yml - register your bundle in Oro way
- ScopeAcmeBundle.php
Adding new bundle manually
New bundle
Developer Training
app/console generate:bundle
--namespace=Acme/DemoBundle
--dir=src [--bundle-name=...]
--no-interaction
Adding new bundle Symfony way
New bundle
Developer Training
How it differs from Symfony
1. Bundle registration
Resources/config/oro/bundles.yml
instead of
automatic/manual registering in AppKernel
2. Routes registration
Resources/config/oro/routing.yml
instead of
automatic/manual registering app/config/routing.yml
Adding new bundle the Oro way
New bundle
Developer Training
The bigger priority number,
the later bundle will be loaded.
Suggested priority for custom bundles is >= 200
For overriding existing - more than parent.
Priorities
New bundle
Developer Training
Manually Auto Generate
- create entity class app/console generate:doctrine:entity
- describe mapping app/console generate:doctrine:crud
for each entity Entity should already exists before crud
- with annotations Note: Symfony generated
- with yaml/xml views and controllers
could not be used as is.
+ create controllers
+ add views and run migration
Creating entity and basic CRUD
New bundle
Developer Training
- Data migrations (Fixtures)
- AcmeBundle/Migrations/Data/ORM
- Schema migrations
- AcmeBundle/Migrations/Schema/v1_0 (v2_2, v1_0_2, etc)
- AcmeBundle/Migrations/Schema/AcmeBundleInstaller
covers state after some migration (e.g. v1_3)
using getMigrationVersion method.
Add migration
New bundle > Creating entity and basic CRUD
Developer Training
• Show queries to update schema
doctrine:schema:update --dump-sql
• Update it by running these SQL queries
doctrine:schema:update --force or manually
• Use command to get generated installer code
oro:migration:dump --bundle=AcmeDemoBundle
supports --plain-sql option
AcmeDemoBundle/Migrations/Schema/AcmeDemoBundleInstaller
• Drop entities created manually by SQL
• Run app/console oro:platform:update --force
Add migration
New bundle > Creating entity and basic CRUD
Developer Training
Basic CRUD Controller
Basic CRUD is common across all Oro platform controllers.
What do we need:
• Basic controller actions: list, view and update
• REST API controller to handle delete
• Form type and form API type
• Form handler
• Routing definition
• ApiManager
New bundle > CRUD
Developer Training
Basic CRUD Controller
Steps:
• Actions: create, update, index and view
• Name routes and acl resources in annotations
• Form type, form and form handler as a service
• Repeat previous step for API form type, API form and
API form handler
• Form handler and API form handler as a service
• Register ApiEntityManager as your own service with
entity class name
• Define titles in navigation.yml
• Don’t forget to add translations
New bundle > CRUD
Developer Training
Routing
AcmeBundle/Resources/config/oro/routing.yml
- define regular controller
- add definition for API controller
- app/console router:debug
New bundle > CRUD
Developer Training
Filling the gaps
Now we are able to fill missing parts in our controllers:
Controller use form handler to manage form configured with form type.
API Controller use ApiManager to work with entity.
New bundle > CRUD
Developer Training
Filling the gaps
Next
proceed with datagrid definition
using services names, we got at previous step.
New bundle > CRUD
Developer Training
List (index), bare minimum
• define list grid with datagrid.yml
• extend OroUIBundle:actions:index.html.twig
• define gridName (grid definition should
already exists) and pageTitle
• add nav button block
Views
New bundle > CRUD
Developer Training
Create/Update
• extend OroUIBundle:actions:update.html.twig
• use oro_title_set command to set title
• define blocks: navButtons, pageHeader,
content_data
Views
New bundle > CRUD
Developer Training
View
• extend OroUIBundle:actions:view.html.twig
• use oro_title_set command to set title
• main blocks: breadcrumbs, content_data
• content widget - reusable block
Views
New bundle > CRUD
Developer Training
Each bundle can override another one.
If multiple bundles overriding the same one - the last
loaded will win.
AcmeDemoBundle::gerParent() should return short alias
of parent bundle, e.g.: OroCRMAccount.
Overriding existing bundle
Developer Training
Use services definition file services.yml (.xml, .php)
- change class name to point to own service
- extend custom service from origin
Overriding service
Overriding existing bundle
Developer Training
Defined in navigation.yml
Customizations:
- add menu items to existing or new top level item
- hide
- move existing item
These could be done in the navigation.yml.
But in case of menu items are event-driven (e.g. Sales
menu) - event listeners or menu builders are the only
choice.
Customizing app menu
Overriding existing bundle
Developer Training
oro:navigation:init
is your friend
(when you change/add titles in navigation.yml)
Customizing app menu
Overriding existing bundle
Developer Training
Two types of entities:
- regular entity
- Doctrine DBAL Schema to describe changes
- change entity manually
- extended entity
- Doctrine DBAL Schema
- ‘extend’ configuration
- automatically generated code
Migrations are used to add or change fields in existing
entities.
Add fields to existing entities
Overriding existing bundle
Developer Training
Order of the migration
OrderedMigrationInterface
Manage order within the same version.
ExtendEntity migration
ExtendExtensionAwareInterface
Inject Extend migration extension
Add fields to existing entities
Overriding existing bundle
Developer Training
Requirements
• The base entity must be Extended entity
• target entity must be at least Configurable
Configurable entity defined by annotation:
OroBundleEntityConfigBundleMetadataAnnotationConfig
Extend relations
Overriding existing bundle
Developer Training
Forms override:
- using Symfony form inheritance (Form::getParent)
- form service class name override + class extend
- form extension
Overriding forms and validation
Overriding existing bundle
Developer Training
Overriding forms and validation
How to change validation rules?
- Define own validation group
- Form type guesser
Possible only if form item defined in builder without type
Overriding existing bundle
Developer Training
Same controller class name, same folders structure.
Depending on what is registered in the parent bundle.
As one resource - directory Controller
- copy-paste all routes definitions
- or use Oro way with ! sign
As one resource for each Controller
- nothing, works as is
Overriding controllers and routes
Overriding existing bundle
Developer Training
Put view (Twig template) in the same directory structure
in child bundle, as it’s in parent.
“!” sign could be used with short bundle name syntax,
to refer to blocks from parent bundle.
e.g. !@OroCRMAccountBundle:Account:view.twig.html
will refer to original template, not overridden.
Overriding views, adding placeholders
Overriding existing bundle
Developer Training
RequireJS configuration: requirejs.yml
Mapping should be used to set overrides.
In overridden file - define module with parent module as
dependency and override or add methods to it.
JS modules customization
Overriding existing bundle
Developer Training
• New entity
• New fields to existing entity
• CRUD for new entity
• Overridden controller for existing
• Routes override
• Overridden view and placeholder usage
• Form and validation customizations
• JS modules extending
Summary
Developer Training
Q & A
Quality Control

More Related Content

What's hot

Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flaskJeetendra singh
 
Intoduction to Play Framework
Intoduction to Play FrameworkIntoduction to Play Framework
Intoduction to Play FrameworkKnoldus Inc.
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with codekamal kotecha
 
.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6aminmesbahi
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaRainer Stropek
 
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISEWINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISEHitesh Mohapatra
 
Documenting from the Trenches
Documenting from the TrenchesDocumenting from the Trenches
Documenting from the TrenchesXavier Noria
 
DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)Hendrik Ebbers
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/ServletSunil OS
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16aminmesbahi
 

What's hot (20)

Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flask
 
Maven
MavenMaven
Maven
 
Spring core
Spring coreSpring core
Spring core
 
Intoduction to Play Framework
Intoduction to Play FrameworkIntoduction to Play Framework
Intoduction to Play Framework
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA Austria
 
This is how we REST
This is how we RESTThis is how we REST
This is how we REST
 
Laravel 5
Laravel 5Laravel 5
Laravel 5
 
Wt unit 3
Wt unit 3 Wt unit 3
Wt unit 3
 
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISEWINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
 
Wt unit 4
Wt unit 4Wt unit 4
Wt unit 4
 
Documenting from the Trenches
Documenting from the TrenchesDocumenting from the Trenches
Documenting from the Trenches
 
Wt unit 5
Wt unit 5Wt unit 5
Wt unit 5
 
DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/Servlet
 
Red5 - PHUG Workshops
Red5 - PHUG WorkshopsRed5 - PHUG Workshops
Red5 - PHUG Workshops
 
Advance Java
Advance JavaAdvance Java
Advance Java
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16
 

Similar to Customizing oro crm webinar

Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction PresentationNerd Tzanetopoulos
 
Getting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated VersionGetting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated VersionCFEngine
 
Getting started with CFEngine - Webinar
Getting started with CFEngine - WebinarGetting started with CFEngine - Webinar
Getting started with CFEngine - WebinarCFEngine
 
ZopeSkel & Buildout packages
ZopeSkel & Buildout packagesZopeSkel & Buildout packages
ZopeSkel & Buildout packagesQuintagroup
 
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...Nagios
 
Ctools presentation
Ctools presentationCtools presentation
Ctools presentationDigitaria
 
Using the Corporate Geographic Data Model with Subversion
Using the Corporate Geographic Data Model with SubversionUsing the Corporate Geographic Data Model with Subversion
Using the Corporate Geographic Data Model with SubversionDebbie Wilson
 
Import contents, taxonomies and translations in Drupal8
Import contents, taxonomies and translations in Drupal8Import contents, taxonomies and translations in Drupal8
Import contents, taxonomies and translations in Drupal8Takafumi Oinuma
 
Artem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalkArtem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalkArtem Zhurbila
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOAltinity Ltd
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Stamatis Zampetakis
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLAkhil Mittal
 
Tips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxTips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxAgusto Sipahutar
 
Working With The Symfony Admin Generator
Working With The Symfony Admin GeneratorWorking With The Symfony Admin Generator
Working With The Symfony Admin GeneratorJohn Cleveley
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend FrameworkJuan Antonio
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkRapidValue
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 Software
 

Similar to Customizing oro crm webinar (20)

Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
 
QED Reddo
QED ReddoQED Reddo
QED Reddo
 
Getting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated VersionGetting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated Version
 
Getting started with CFEngine - Webinar
Getting started with CFEngine - WebinarGetting started with CFEngine - Webinar
Getting started with CFEngine - Webinar
 
ZopeSkel & Buildout packages
ZopeSkel & Buildout packagesZopeSkel & Buildout packages
ZopeSkel & Buildout packages
 
Devise and Rails
Devise and RailsDevise and Rails
Devise and Rails
 
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
 
Ctools presentation
Ctools presentationCtools presentation
Ctools presentation
 
Using the Corporate Geographic Data Model with Subversion
Using the Corporate Geographic Data Model with SubversionUsing the Corporate Geographic Data Model with Subversion
Using the Corporate Geographic Data Model with Subversion
 
Import contents, taxonomies and translations in Drupal8
Import contents, taxonomies and translations in Drupal8Import contents, taxonomies and translations in Drupal8
Import contents, taxonomies and translations in Drupal8
 
Artem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalkArtem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalk
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
 
Tips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxTips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptx
 
Working With The Symfony Admin Generator
Working With The Symfony Admin GeneratorWorking With The Symfony Admin Generator
Working With The Symfony Admin Generator
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend Framework
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Angularjs Live Project
Angularjs Live ProjectAngularjs Live Project
Angularjs Live Project
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
 

More from Oro Inc.

Jary Carter Presents OroCRM
Jary Carter Presents OroCRMJary Carter Presents OroCRM
Jary Carter Presents OroCRMOro Inc.
 
Best Practices For Taking Your B2B Company Online
Best Practices For Taking Your B2B Company OnlineBest Practices For Taking Your B2B Company Online
Best Practices For Taking Your B2B Company OnlineOro Inc.
 
Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017
Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017
Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017Oro Inc.
 
How to Close More Deals with B2B eCommerce Systems
How to Close More Deals with B2B eCommerce SystemsHow to Close More Deals with B2B eCommerce Systems
How to Close More Deals with B2B eCommerce SystemsOro Inc.
 
Email is the digital key - dotmailer, Oro MeetUp, Paris
Email is the digital key - dotmailer, Oro MeetUp, ParisEmail is the digital key - dotmailer, Oro MeetUp, Paris
Email is the digital key - dotmailer, Oro MeetUp, ParisOro Inc.
 
B2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, Paris
B2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, ParisB2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, Paris
B2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, ParisOro Inc.
 
Comment April Moto met en place une relation client multicanal et augmente so...
Comment April Moto met en place une relation client multicanal et augmente so...Comment April Moto met en place une relation client multicanal et augmente so...
Comment April Moto met en place une relation client multicanal et augmente so...Oro Inc.
 
Revolutionizing CRM market & B2B eCommerce - Oro MeetUp in Paris
Revolutionizing CRM market & B2B eCommerce - Oro MeetUp in ParisRevolutionizing CRM market & B2B eCommerce - Oro MeetUp in Paris
Revolutionizing CRM market & B2B eCommerce - Oro MeetUp in ParisOro Inc.
 
Oro Meetup London - Allies: How can we really turn data into profit?
Oro Meetup London - Allies: How can we really turn data into profit?Oro Meetup London - Allies: How can we really turn data into profit?
Oro Meetup London - Allies: How can we really turn data into profit?Oro Inc.
 
Oro London Meetup - dotmailer: Faster, smarter, better, email marketing
Oro London Meetup - dotmailer: Faster, smarter, better, email marketingOro London Meetup - dotmailer: Faster, smarter, better, email marketing
Oro London Meetup - dotmailer: Faster, smarter, better, email marketingOro Inc.
 
Oro Meetup in London - Oro product vision
Oro Meetup in London - Oro product visionOro Meetup in London - Oro product vision
Oro Meetup in London - Oro product visionOro Inc.
 
Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”
Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”
Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”Oro Inc.
 
11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...
11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...
11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...Oro Inc.
 
11.10.15 Webinar: “Improving Magento performance with Blackfire.io”
11.10.15 Webinar: “Improving Magento performance with Blackfire.io”11.10.15 Webinar: “Improving Magento performance with Blackfire.io”
11.10.15 Webinar: “Improving Magento performance with Blackfire.io”Oro Inc.
 
"New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM...
"New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM..."New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM...
"New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM...Oro Inc.
 
Benefits of OroCRM + Magento Webinar
Benefits of OroCRM + Magento WebinarBenefits of OroCRM + Magento Webinar
Benefits of OroCRM + Magento WebinarOro Inc.
 
Benefits of Magento + OroCRM Webinar
Benefits of Magento + OroCRM WebinarBenefits of Magento + OroCRM Webinar
Benefits of Magento + OroCRM WebinarOro Inc.
 
OroCRM Multi-Channel Webinar
OroCRM Multi-Channel WebinarOroCRM Multi-Channel Webinar
OroCRM Multi-Channel WebinarOro Inc.
 
Powerful Customer Service with OroCRM + Zendesk
Powerful Customer Service with OroCRM + ZendeskPowerful Customer Service with OroCRM + Zendesk
Powerful Customer Service with OroCRM + ZendeskOro Inc.
 
Integration with presta shop webinar
Integration with presta shop webinarIntegration with presta shop webinar
Integration with presta shop webinarOro Inc.
 

More from Oro Inc. (20)

Jary Carter Presents OroCRM
Jary Carter Presents OroCRMJary Carter Presents OroCRM
Jary Carter Presents OroCRM
 
Best Practices For Taking Your B2B Company Online
Best Practices For Taking Your B2B Company OnlineBest Practices For Taking Your B2B Company Online
Best Practices For Taking Your B2B Company Online
 
Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017
Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017
Oro Revolutionizes B2B Commerce - OroMeetup NL, 2017
 
How to Close More Deals with B2B eCommerce Systems
How to Close More Deals with B2B eCommerce SystemsHow to Close More Deals with B2B eCommerce Systems
How to Close More Deals with B2B eCommerce Systems
 
Email is the digital key - dotmailer, Oro MeetUp, Paris
Email is the digital key - dotmailer, Oro MeetUp, ParisEmail is the digital key - dotmailer, Oro MeetUp, Paris
Email is the digital key - dotmailer, Oro MeetUp, Paris
 
B2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, Paris
B2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, ParisB2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, Paris
B2B, soyez prêts pour la 2ème vague e-commerce - Akeneo, Oro MeetUp, Paris
 
Comment April Moto met en place une relation client multicanal et augmente so...
Comment April Moto met en place une relation client multicanal et augmente so...Comment April Moto met en place une relation client multicanal et augmente so...
Comment April Moto met en place une relation client multicanal et augmente so...
 
Revolutionizing CRM market & B2B eCommerce - Oro MeetUp in Paris
Revolutionizing CRM market & B2B eCommerce - Oro MeetUp in ParisRevolutionizing CRM market & B2B eCommerce - Oro MeetUp in Paris
Revolutionizing CRM market & B2B eCommerce - Oro MeetUp in Paris
 
Oro Meetup London - Allies: How can we really turn data into profit?
Oro Meetup London - Allies: How can we really turn data into profit?Oro Meetup London - Allies: How can we really turn data into profit?
Oro Meetup London - Allies: How can we really turn data into profit?
 
Oro London Meetup - dotmailer: Faster, smarter, better, email marketing
Oro London Meetup - dotmailer: Faster, smarter, better, email marketingOro London Meetup - dotmailer: Faster, smarter, better, email marketing
Oro London Meetup - dotmailer: Faster, smarter, better, email marketing
 
Oro Meetup in London - Oro product vision
Oro Meetup in London - Oro product visionOro Meetup in London - Oro product vision
Oro Meetup in London - Oro product vision
 
Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”
Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”
Webinar: “Create the Ultimate Customer Experience with Prestashop + OroCRM”
 
11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...
11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...
11.17.15 Webinar: “Merchants: deliver an outstanding experience to your custo...
 
11.10.15 Webinar: “Improving Magento performance with Blackfire.io”
11.10.15 Webinar: “Improving Magento performance with Blackfire.io”11.10.15 Webinar: “Improving Magento performance with Blackfire.io”
11.10.15 Webinar: “Improving Magento performance with Blackfire.io”
 
"New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM...
"New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM..."New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM...
"New OroCRM Release Demo: Discover what’s new in the latest release of OroCRM...
 
Benefits of OroCRM + Magento Webinar
Benefits of OroCRM + Magento WebinarBenefits of OroCRM + Magento Webinar
Benefits of OroCRM + Magento Webinar
 
Benefits of Magento + OroCRM Webinar
Benefits of Magento + OroCRM WebinarBenefits of Magento + OroCRM Webinar
Benefits of Magento + OroCRM Webinar
 
OroCRM Multi-Channel Webinar
OroCRM Multi-Channel WebinarOroCRM Multi-Channel Webinar
OroCRM Multi-Channel Webinar
 
Powerful Customer Service with OroCRM + Zendesk
Powerful Customer Service with OroCRM + ZendeskPowerful Customer Service with OroCRM + Zendesk
Powerful Customer Service with OroCRM + Zendesk
 
Integration with presta shop webinar
Integration with presta shop webinarIntegration with presta shop webinar
Integration with presta shop webinar
 

Customizing oro crm webinar

  • 2. Developer Training Goals - Overview of OroCRM customization techniques - Demonstrate implementation of customer requirements - Share best practices
  • 3. Developer Training Customization requirements - Account should be accessible from top level menu - Edit B2bCustomer details from Account page - Add invoice entity and link it to the Account - Bypass the datetime setting automatically for Contact, if it’s already set - Add employee_count to Account
  • 4. Developer Training Introduction In general, the same customization methods applied to OroCRM, as to raw Symfony application. These includes: overriding controllers, views, services. Though some OroCRM specific differences exist.
  • 5. Developer Training Manually Auto Generate - create directory structure app/console generate:bundle - add bundle class Clear cache afterwards: app/console cache:clear Adding new bundle New bundle
  • 6. Developer Training Minimal structure Bundle folder AcmeBundle, located in: src/Scope/Bundle, where Scope - company, dep., etc AcmeBundle - Resources - config - oro - bundles.yml - register your bundle in Oro way - ScopeAcmeBundle.php Adding new bundle manually New bundle
  • 7. Developer Training app/console generate:bundle --namespace=Acme/DemoBundle --dir=src [--bundle-name=...] --no-interaction Adding new bundle Symfony way New bundle
  • 8. Developer Training How it differs from Symfony 1. Bundle registration Resources/config/oro/bundles.yml instead of automatic/manual registering in AppKernel 2. Routes registration Resources/config/oro/routing.yml instead of automatic/manual registering app/config/routing.yml Adding new bundle the Oro way New bundle
  • 9. Developer Training The bigger priority number, the later bundle will be loaded. Suggested priority for custom bundles is >= 200 For overriding existing - more than parent. Priorities New bundle
  • 10. Developer Training Manually Auto Generate - create entity class app/console generate:doctrine:entity - describe mapping app/console generate:doctrine:crud for each entity Entity should already exists before crud - with annotations Note: Symfony generated - with yaml/xml views and controllers could not be used as is. + create controllers + add views and run migration Creating entity and basic CRUD New bundle
  • 11. Developer Training - Data migrations (Fixtures) - AcmeBundle/Migrations/Data/ORM - Schema migrations - AcmeBundle/Migrations/Schema/v1_0 (v2_2, v1_0_2, etc) - AcmeBundle/Migrations/Schema/AcmeBundleInstaller covers state after some migration (e.g. v1_3) using getMigrationVersion method. Add migration New bundle > Creating entity and basic CRUD
  • 12. Developer Training • Show queries to update schema doctrine:schema:update --dump-sql • Update it by running these SQL queries doctrine:schema:update --force or manually • Use command to get generated installer code oro:migration:dump --bundle=AcmeDemoBundle supports --plain-sql option AcmeDemoBundle/Migrations/Schema/AcmeDemoBundleInstaller • Drop entities created manually by SQL • Run app/console oro:platform:update --force Add migration New bundle > Creating entity and basic CRUD
  • 13. Developer Training Basic CRUD Controller Basic CRUD is common across all Oro platform controllers. What do we need: • Basic controller actions: list, view and update • REST API controller to handle delete • Form type and form API type • Form handler • Routing definition • ApiManager New bundle > CRUD
  • 14. Developer Training Basic CRUD Controller Steps: • Actions: create, update, index and view • Name routes and acl resources in annotations • Form type, form and form handler as a service • Repeat previous step for API form type, API form and API form handler • Form handler and API form handler as a service • Register ApiEntityManager as your own service with entity class name • Define titles in navigation.yml • Don’t forget to add translations New bundle > CRUD
  • 15. Developer Training Routing AcmeBundle/Resources/config/oro/routing.yml - define regular controller - add definition for API controller - app/console router:debug New bundle > CRUD
  • 16. Developer Training Filling the gaps Now we are able to fill missing parts in our controllers: Controller use form handler to manage form configured with form type. API Controller use ApiManager to work with entity. New bundle > CRUD
  • 17. Developer Training Filling the gaps Next proceed with datagrid definition using services names, we got at previous step. New bundle > CRUD
  • 18. Developer Training List (index), bare minimum • define list grid with datagrid.yml • extend OroUIBundle:actions:index.html.twig • define gridName (grid definition should already exists) and pageTitle • add nav button block Views New bundle > CRUD
  • 19. Developer Training Create/Update • extend OroUIBundle:actions:update.html.twig • use oro_title_set command to set title • define blocks: navButtons, pageHeader, content_data Views New bundle > CRUD
  • 20. Developer Training View • extend OroUIBundle:actions:view.html.twig • use oro_title_set command to set title • main blocks: breadcrumbs, content_data • content widget - reusable block Views New bundle > CRUD
  • 21. Developer Training Each bundle can override another one. If multiple bundles overriding the same one - the last loaded will win. AcmeDemoBundle::gerParent() should return short alias of parent bundle, e.g.: OroCRMAccount. Overriding existing bundle
  • 22. Developer Training Use services definition file services.yml (.xml, .php) - change class name to point to own service - extend custom service from origin Overriding service Overriding existing bundle
  • 23. Developer Training Defined in navigation.yml Customizations: - add menu items to existing or new top level item - hide - move existing item These could be done in the navigation.yml. But in case of menu items are event-driven (e.g. Sales menu) - event listeners or menu builders are the only choice. Customizing app menu Overriding existing bundle
  • 24. Developer Training oro:navigation:init is your friend (when you change/add titles in navigation.yml) Customizing app menu Overriding existing bundle
  • 25. Developer Training Two types of entities: - regular entity - Doctrine DBAL Schema to describe changes - change entity manually - extended entity - Doctrine DBAL Schema - ‘extend’ configuration - automatically generated code Migrations are used to add or change fields in existing entities. Add fields to existing entities Overriding existing bundle
  • 26. Developer Training Order of the migration OrderedMigrationInterface Manage order within the same version. ExtendEntity migration ExtendExtensionAwareInterface Inject Extend migration extension Add fields to existing entities Overriding existing bundle
  • 27. Developer Training Requirements • The base entity must be Extended entity • target entity must be at least Configurable Configurable entity defined by annotation: OroBundleEntityConfigBundleMetadataAnnotationConfig Extend relations Overriding existing bundle
  • 28. Developer Training Forms override: - using Symfony form inheritance (Form::getParent) - form service class name override + class extend - form extension Overriding forms and validation Overriding existing bundle
  • 29. Developer Training Overriding forms and validation How to change validation rules? - Define own validation group - Form type guesser Possible only if form item defined in builder without type Overriding existing bundle
  • 30. Developer Training Same controller class name, same folders structure. Depending on what is registered in the parent bundle. As one resource - directory Controller - copy-paste all routes definitions - or use Oro way with ! sign As one resource for each Controller - nothing, works as is Overriding controllers and routes Overriding existing bundle
  • 31. Developer Training Put view (Twig template) in the same directory structure in child bundle, as it’s in parent. “!” sign could be used with short bundle name syntax, to refer to blocks from parent bundle. e.g. !@OroCRMAccountBundle:Account:view.twig.html will refer to original template, not overridden. Overriding views, adding placeholders Overriding existing bundle
  • 32. Developer Training RequireJS configuration: requirejs.yml Mapping should be used to set overrides. In overridden file - define module with parent module as dependency and override or add methods to it. JS modules customization Overriding existing bundle
  • 33. Developer Training • New entity • New fields to existing entity • CRUD for new entity • Overridden controller for existing • Routes override • Overridden view and placeholder usage • Form and validation customizations • JS modules extending Summary
  • 34. Developer Training Q & A Quality Control