SlideShare a Scribd company logo
1 of 36
About
Me: Aneesh Sreedharan
My company: 2Hats Logic Solutions
www.2hatslogic.com
info@2hatslogic.com
Overview of Magento
• E-commerce software
• Start by Varien
• Evolving
• Buying of eBay
• Magento 2.0
Why Magento 2
• Why magento 1 to 2 change?
- Magento 1 gets matured.
- integration with technologies that are current standard in development.
Like use of composer
- modular and extensible than before.
- Better admin interfaces
• Opportunities
- There’s in excess of 240,000 shops on Magento
Magento 2 System requirements
• PHP version 5.5+
• MySQL version 5.6.0+
• PHP Extensions - PDO/MySQL, mbstring, mcrypt,
mhash, SimpleXML, curl, xsl, gd, ImageMagick 6.3.7 (or
later) or both, soap, intl, bc-math,openssl
Getting started, Installation
• Download directly
• Use composer(use packagist.org for packages)
• Authentication keys
- username – public key, password – private key
Setup wizard, installation
Completing installation
• Empty pub/static folder in win server
php <path to >bin/magento setup:static-content:deploy
Admin area
Magento CLI
• Command-Line Interface
• php <Magento install dir>/bin/magento <command name>
• php <Magento install dir>/bin/magento list
• php <Magento install dir>/bin/magento sampledata:deploy
• php <Magento install dir>/bin/magento setup:upgrade
Main admin settings
• Stores > Configuration settings
- General > Web - Base URL (secure and insecure)
- General > Design – Theme selection
- Sales > Checkout/shipping/Payment methods
- Advanced > Developer – Debug- Enable template path hints
• System > Cache management
• System > Index management
• System > Web setup wizard
Folder structure comparison
Creating a theme
• Create a directory for the theme
under app/design/frontend/<your_vendor_name>/<your_the
me_name>.
• Add a declaration file theme.xml
• optionally create etc directory and create a file
named view.xml.
• Add a composer.json file.
• Add registration.php.
• Create directories for CSS, JavaScript, images, and fonts.
• Configure your theme in the Admin panel.
Creating a theme directory
• <your install dir>/app/design/frontend/<Vendor>/<theme_name>
Declare the theme
• Copy vendor/magento/theme-frontend-blank/theme.xml to
app/design/frontend/<Vendor>/<theme_name>
• * optionally make it a composer package
Add registration.php
• Create a file registration.php in
app/design/frontend/<Vendor>/<theme_name>
Configure product images
• Create /etc/ folder in theme directory
• Copy view.xml from existing theme like Magento-frontend-blank
Create directories for static files
Theme created - activation
How to find the templates
How to find the templates
Overriding templates
• Vendor/magento/module-
checkout/view/frontend/templates/cart/minicart.phtml
• Copy to
app/design/frontend/Hatslogic/mytheme/Magento_Checkout/templates/
cart/minicart.phtml
Layout handling with xml files
• 1-column, 2column-left,-right, 3column
• Magento uses xml files to handle page layout
• vendormagentomodule-catalogviewfrontendlayout
- <block>
- <container>
- before and after attributes
- <referenceBlock> and <referenceContainer>
- <move>
- <argument>
Layout handling with xml files
Extending a layout
• Extend Magento product view layout
<Magento_Catalog_module_dir>/view/frontend/layout/catalog_product_vie
w.xml
<theme_dir>/Magento_Catalog/layout/catalog_product_view.xml
Overriding a module layout
Overriding a theme layout
Creating a custom module
• Create module in folder <magento
install>/app/code/<Vendor>/<ModuleName>
• Main folders of Module
- Block
- Controller
- etc (contains module.xml)
- Model
- Setup
- view
Creating a custom module
• Create module.xml in <install_dir>/app/code/<Vendor>/<Module>/etc/
• Create registration.php in <install_dir>/app/code/<Vendor>/<Module>
Creating custom module
• Add composer.json file
Creating custom modules
# Enable a module
php -f bin/magento module:enable Vendor_ModuleName
Php –f bin/magento module:enable Hatslogic_HelloWorld
# Update the setup/database
php -f bin/magento setup:upgrade
Creates and entry in app/etc/config.php
Enable custom module - Issues
# there are no commands defined in the module
namespace
- an issue in composer.json
- an issue in module.xml
- wrong config of registration.php
Custom module – Routes
• Create a routes.xml file
• domain.com/hello_world/awesome/life
Custom module - Controllers
• Create a controller file
• domain.com/hello_world/awesome/life
Some interesting features
• Color swatches made easy
• Javascript - jQuery
• Performance - Varnish cache support
• Improved checkout process
• Backup/Rollback system
• Admin UI
Resources
• http://devdocs.magento.com/
• http://alanstorm.com/category/magento
• http://inchoo.net/
• http://laracasts.com
Thank you!
Keep in touch.
Skype : hatslogic
Email : aneesh@2hatslogic.com

More Related Content

What's hot

Federico Soich - Upgrading Magento Version
Federico Soich - Upgrading Magento VersionFederico Soich - Upgrading Magento Version
Federico Soich - Upgrading Magento VersionMeet Magento Italy
 
How to Install Magento Theme
How to Install Magento ThemeHow to Install Magento Theme
How to Install Magento ThemeM-Connect Media
 
How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0Daniele Crupi
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Mathew Beane
 
Meet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey IvashchenkoMeet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey IvashchenkoAmasty
 
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2Meet Magento Italy
 
M2ModuleDevelopmenteBook
M2ModuleDevelopmenteBookM2ModuleDevelopmenteBook
M2ModuleDevelopmenteBookTrọng Huỳnh
 
Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...
Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...
Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...Meet Magento Italy
 
Blog Pro 2.0 User Guide
Blog Pro 2.0 User GuideBlog Pro 2.0 User Guide
Blog Pro 2.0 User GuideIgor Goltsov
 
IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.michele buccarello
 
Unit 2.10 - Frames
Unit 2.10 - FramesUnit 2.10 - Frames
Unit 2.10 - FramesIntan Jameel
 
Websphere portal theme menu framework
Websphere portal theme menu frameworkWebsphere portal theme menu framework
Websphere portal theme menu frameworkmichele buccarello
 
Enable seo friendly url in websphere portal
Enable seo friendly url in websphere portalEnable seo friendly url in websphere portal
Enable seo friendly url in websphere portalmichele buccarello
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHPEdureka!
 
How to Install Magento 2 On Wamp
How to Install Magento 2 On WampHow to Install Magento 2 On Wamp
How to Install Magento 2 On WampTecstub
 
APEX navigation concepts
APEX navigation conceptsAPEX navigation concepts
APEX navigation conceptsTobias Arnhold
 

What's hot (20)

Federico Soich - Upgrading Magento Version
Federico Soich - Upgrading Magento VersionFederico Soich - Upgrading Magento Version
Federico Soich - Upgrading Magento Version
 
Magento2 what's new in theming
Magento2 what's new in themingMagento2 what's new in theming
Magento2 what's new in theming
 
How to Install Magento Theme
How to Install Magento ThemeHow to Install Magento Theme
How to Install Magento Theme
 
How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
Meet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey IvashchenkoMeet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey Ivashchenko
 
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2
 
M2ModuleDevelopmenteBook
M2ModuleDevelopmenteBookM2ModuleDevelopmenteBook
M2ModuleDevelopmenteBook
 
Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...
Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...
Francesco Zoccarato - Configuratori prodotto: soluzioni e tecniche per un'imp...
 
hw4_specifications
hw4_specificationshw4_specifications
hw4_specifications
 
Les15
Les15Les15
Les15
 
Blog Pro 2.0 User Guide
Blog Pro 2.0 User GuideBlog Pro 2.0 User Guide
Blog Pro 2.0 User Guide
 
Develop magento 2 custom shipping module
Develop magento 2 custom shipping moduleDevelop magento 2 custom shipping module
Develop magento 2 custom shipping module
 
IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.
 
Unit 2.10 - Frames
Unit 2.10 - FramesUnit 2.10 - Frames
Unit 2.10 - Frames
 
Websphere portal theme menu framework
Websphere portal theme menu frameworkWebsphere portal theme menu framework
Websphere portal theme menu framework
 
Enable seo friendly url in websphere portal
Enable seo friendly url in websphere portalEnable seo friendly url in websphere portal
Enable seo friendly url in websphere portal
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHP
 
How to Install Magento 2 On Wamp
How to Install Magento 2 On WampHow to Install Magento 2 On Wamp
How to Install Magento 2 On Wamp
 
APEX navigation concepts
APEX navigation conceptsAPEX navigation concepts
APEX navigation concepts
 

Similar to Magento 2 - Getting started.

php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101Mathew Beane
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101Mathew Beane
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Servervarien
 
Magento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentMagento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentKapil Dev Singh
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2Mathew Beane
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development Mage Guru
 
Magento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration ToolsMagento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration ToolsSergii Shymko
 
Magento CMS Presentation
Magento CMS PresentationMagento CMS Presentation
Magento CMS PresentationRAJU MAKWANA
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in MagentoEric Landmann
 
Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more AResourcePool
 
Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2Hanoi MagentoMeetup
 
Expert guidance on migrating from magento 1 to magento 2
Expert guidance on migrating from magento 1 to magento 2Expert guidance on migrating from magento 1 to magento 2
Expert guidance on migrating from magento 1 to magento 2James Cowie
 
Magento2 frontend development
Magento2   frontend developmentMagento2   frontend development
Magento2 frontend developmentKapil Dev Singh
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Sergii Shymko
 
Varnish Cache and its usage in the real world!
Varnish Cache and its usage in the real world!Varnish Cache and its usage in the real world!
Varnish Cache and its usage in the real world!Ivan Chepurnyi
 
Introduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformIntroduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformJarne W. Beutnagel
 
Introduction to Mangento
Introduction to Mangento Introduction to Mangento
Introduction to Mangento Ravi Mehrotra
 
Zepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalZepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalMax Pronko
 

Similar to Magento 2 - Getting started. (20)

php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Server
 
Magento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentMagento2 Basics for Frontend Development
Magento2 Basics for Frontend Development
 
Magento
MagentoMagento
Magento
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
Magento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration ToolsMagento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration Tools
 
Magento CMS Presentation
Magento CMS PresentationMagento CMS Presentation
Magento CMS Presentation
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in Magento
 
Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more
 
Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2
 
Expert guidance on migrating from magento 1 to magento 2
Expert guidance on migrating from magento 1 to magento 2Expert guidance on migrating from magento 1 to magento 2
Expert guidance on migrating from magento 1 to magento 2
 
Magento2 frontend development
Magento2   frontend developmentMagento2   frontend development
Magento2 frontend development
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2
 
Varnish Cache and its usage in the real world!
Varnish Cache and its usage in the real world!Varnish Cache and its usage in the real world!
Varnish Cache and its usage in the real world!
 
Introduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformIntroduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce Platform
 
Mangento
MangentoMangento
Mangento
 
Introduction to Mangento
Introduction to Mangento Introduction to Mangento
Introduction to Mangento
 
Zepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalZepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_Final
 

Magento 2 - Getting started.

  • 1. About Me: Aneesh Sreedharan My company: 2Hats Logic Solutions www.2hatslogic.com info@2hatslogic.com
  • 2. Overview of Magento • E-commerce software • Start by Varien • Evolving • Buying of eBay • Magento 2.0
  • 3. Why Magento 2 • Why magento 1 to 2 change? - Magento 1 gets matured. - integration with technologies that are current standard in development. Like use of composer - modular and extensible than before. - Better admin interfaces • Opportunities - There’s in excess of 240,000 shops on Magento
  • 4. Magento 2 System requirements • PHP version 5.5+ • MySQL version 5.6.0+ • PHP Extensions - PDO/MySQL, mbstring, mcrypt, mhash, SimpleXML, curl, xsl, gd, ImageMagick 6.3.7 (or later) or both, soap, intl, bc-math,openssl
  • 5. Getting started, Installation • Download directly • Use composer(use packagist.org for packages) • Authentication keys - username – public key, password – private key
  • 7. Completing installation • Empty pub/static folder in win server php <path to >bin/magento setup:static-content:deploy
  • 9. Magento CLI • Command-Line Interface • php <Magento install dir>/bin/magento <command name> • php <Magento install dir>/bin/magento list • php <Magento install dir>/bin/magento sampledata:deploy • php <Magento install dir>/bin/magento setup:upgrade
  • 10. Main admin settings • Stores > Configuration settings - General > Web - Base URL (secure and insecure) - General > Design – Theme selection - Sales > Checkout/shipping/Payment methods - Advanced > Developer – Debug- Enable template path hints • System > Cache management • System > Index management • System > Web setup wizard
  • 12. Creating a theme • Create a directory for the theme under app/design/frontend/<your_vendor_name>/<your_the me_name>. • Add a declaration file theme.xml • optionally create etc directory and create a file named view.xml. • Add a composer.json file. • Add registration.php. • Create directories for CSS, JavaScript, images, and fonts. • Configure your theme in the Admin panel.
  • 13. Creating a theme directory • <your install dir>/app/design/frontend/<Vendor>/<theme_name>
  • 14. Declare the theme • Copy vendor/magento/theme-frontend-blank/theme.xml to app/design/frontend/<Vendor>/<theme_name> • * optionally make it a composer package
  • 15. Add registration.php • Create a file registration.php in app/design/frontend/<Vendor>/<theme_name>
  • 16. Configure product images • Create /etc/ folder in theme directory • Copy view.xml from existing theme like Magento-frontend-blank
  • 17. Create directories for static files
  • 18. Theme created - activation
  • 19. How to find the templates
  • 20. How to find the templates
  • 21. Overriding templates • Vendor/magento/module- checkout/view/frontend/templates/cart/minicart.phtml • Copy to app/design/frontend/Hatslogic/mytheme/Magento_Checkout/templates/ cart/minicart.phtml
  • 22. Layout handling with xml files • 1-column, 2column-left,-right, 3column • Magento uses xml files to handle page layout • vendormagentomodule-catalogviewfrontendlayout - <block> - <container> - before and after attributes - <referenceBlock> and <referenceContainer> - <move> - <argument>
  • 23. Layout handling with xml files
  • 24. Extending a layout • Extend Magento product view layout <Magento_Catalog_module_dir>/view/frontend/layout/catalog_product_vie w.xml <theme_dir>/Magento_Catalog/layout/catalog_product_view.xml
  • 27. Creating a custom module • Create module in folder <magento install>/app/code/<Vendor>/<ModuleName> • Main folders of Module - Block - Controller - etc (contains module.xml) - Model - Setup - view
  • 28. Creating a custom module • Create module.xml in <install_dir>/app/code/<Vendor>/<Module>/etc/ • Create registration.php in <install_dir>/app/code/<Vendor>/<Module>
  • 29. Creating custom module • Add composer.json file
  • 30. Creating custom modules # Enable a module php -f bin/magento module:enable Vendor_ModuleName Php –f bin/magento module:enable Hatslogic_HelloWorld # Update the setup/database php -f bin/magento setup:upgrade Creates and entry in app/etc/config.php
  • 31. Enable custom module - Issues # there are no commands defined in the module namespace - an issue in composer.json - an issue in module.xml - wrong config of registration.php
  • 32. Custom module – Routes • Create a routes.xml file • domain.com/hello_world/awesome/life
  • 33. Custom module - Controllers • Create a controller file • domain.com/hello_world/awesome/life
  • 34. Some interesting features • Color swatches made easy • Javascript - jQuery • Performance - Varnish cache support • Improved checkout process • Backup/Rollback system • Admin UI
  • 36. Thank you! Keep in touch. Skype : hatslogic Email : aneesh@2hatslogic.com