This is a basic tutorial presentation explaining how to get started with magento 2. Can be useful for programmers who wants a concise step by step starting tutorial on magento 2.
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
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
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>
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>
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
34. Some interesting features
• Color swatches made easy
• Javascript - jQuery
• Performance - Varnish cache support
• Improved checkout process
• Backup/Rollback system
• Admin UI