SlideShare a Scribd company logo
1 of 29
inchoo.net
Magento 2 Checkout — Frontend perspective
Mladen Ristić
inchoo.net
Magento 2 changes:
●New Layout Structure
●New File Structure
●New Frontend Responsive theme
●New Admin theme
Checkout - most radical change on frontend
1. UI differences
1. UI differences
Main UI improvements (1):
● Reduced number of steps
○ Absolutely beneficial for user’s experience.
● Clean and simple interface
○ Easier shopping progress
1. UI differences
Main UI improvements (2):
Current Magento Onepage Checkout - 6 steps:
●Checkout method
●Billing information
●Shipping information
●Shipping method
●Payment information
●Order information
1. UI differences
Main UI improvements (2):
New Magento Checkout – 2 steps:
•Shipping step
•Review & Payment step
New checkout can be a definite improvement if designers and
developers have the knowledge and decide to follow this new
approach.
Benefits:
•New customer can place order in less than 2 minutes
•Increased number of successful orders
1. UI differences
Other UI improvements
● Simplified header - less elements
● Removed footer
● Progress bar – navigation through steps.
Possible improvement:
● Promo code on last Checkout step
This shows that Magento 2 will be up to date with latest
ecommerce best practices - At least on the surface.
2. Performance
Loading time M1 vs M2 Checkout (1):
Three years ago:
● More than 47% of people expect a web page to load
in two seconds or less
Today:
● 60% or more by today's standards
● Page load time can be two seconds, but less is
almost mandatory
2. Performance
Loading time M1 vs M2 Checkout (2):
Page load time directly affects:
●Customers satisfaction
●Store revenue
How seriously Magento 2 approached this topic?
Performance results and comparisons:
http://www.magemeter.com/benchmark/index
2. Performance
Loading time M1 vs M2 Checkout (3):
Magento 1 EE - Madison Island theme.
VS
Magento 2 Checkout - Luma theme.
● Test environment is placed on the same server
● 2 Mbit Internet connection
● With and without a browser cache.
2. Performance
Loading time M1 vs M2 Checkout Results:
Magento
EE – [no
cache]
Magento
EE - with
browser
cache
Magento 2
- 1.0.0-
beta [no
cache]
Magento 2
- 1.0.0
beta - with
cache
No. of
requests
58 58 260 259
MB
transferred
1.2 MB 166 KB 3.1 MB 845 KB
Finish 5.66 s 4.61 s 35.14 s 8.81 s
DOM
Content
Loaded
4.49 s 4.39 s 21.9 s 5.08 s
Load 5.55 s 4.43 s 25.6 s 5.08 s
3. How it works
As we have seen the new checkout on frontend
looks much different than the current one, and also it
is expected that some major changes had to happen
under the hood.
3. How it works
We are familiar with JavaScript in Magento - it isn’t a
new feature in Magento. Current checkout depends
heavily on JavaScript.
New Magento Checkout = JavaScript application
3. How it works
Main template file which Magento 2 uses for checkout:
app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
3. How it works
app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
<div id="checkout" data-bind="scope:'checkout'" class="checkout-container">
<!-- ko template: getTemplate() --><!-- /ko -->
<script type="text/x-magento-init">
{
"#checkout": {
"Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
}
}
</script>
<script>
window.checkoutConfig = <?php /* @escapeNotVerified */ echo Zend_Json::encode($block-
>getCheckoutConfig()); ?>;
// Create aliases for customer.js model from customer module
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
window.customerData = window.checkoutConfig.customerData;
</script>
<script>
require([
'mage/url',
'Magento_Checkout/js/model/step-loader',
'Magento_Ui/js/block-loader'
], function(url, loader, blockLoader) {
loader.registerLoader();
blockLoader("<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>");
return url.setBaseUrl('<?php /* @escapeNotVerified */ echo $block->getBaseUrl();?>');
})
</script>
</div>
3. How it works
One of two ways how Magento 2 initializes a UI
component in a PHTML template:
● data-mage-init
● <script type="text/x-magento-init">
Official documentation:
http://devdocs.magento.com/guides/v2.0/javascript-dev-
guide/javascript/js_init.html.
3. How it works
RequireJS call – dependency file loader
● Which files to load before rendering content
● In what order to load them
After all required JavaScript files are loaded and
all dependencies covered, then JSON object is
generated.
Knockout JS kicks in and starts with rendering
page elements based on JSON object using
HTML file:
app/code/Magento/Checkout/view/frontend/web/templat
e/onepage.html
3. How it works
JSON?
Checkout JSON object
● Holds checkout UI
components
● Generated by a
controller
3. How it works
If you wish to learn more about this:
JSON objects is construed inside
checkout_index_index.xml
Path:
app/code/Magento/Checkout/view/frontend/layout/check
out_index_index.xml
Each element of checkout page with all options is
dynamically created in form of a JSON object.
3. How it works
JavaScript Knockout?
It is a JavaScript library that helps to create rich,
responsive display and editor user interfaces with a
clean underlying data model.
Any time you have sections of UI that update
dynamically JavaScript KO can help you implement it.
3. How it works
Example:
Custom CMS block on Magento 2 Checkout
After we get familiar with concept of rendering a new
checkout let us try to add something new on checkout
page.
Something custom, for example CMS Static block from
admin panel - one of simplest operation in current
Magento.
3. How it works
3. How it works
Example (1):
Custom CMS block on Magento 2 Checkout
In theory, to add static block you need to create XML file
inside your theme.
Like local.xml in current Magento.
In our case we need checkout_index_index.xml inside
path:
app/design/frontend/Inchoo/theme/Magento_Checkout/layout
3. How it works
Example (2):
XML that didn’t work as expected
<body>
<referenceContainer name="content">
<block class="MagentoCmsBlockBlock" name="free.shipping" after="checkout.sidebar">
<action method="setBlockId">
<argument name="id" xsi:type="string">1</argument>
</action>
</block>
</referenceContainer>
</body>
3. How it works
Example (3):
Custom CMS block on Magento 2 Checkout
Layout XML isn’t enough to manipulate new checkout
page. Not even in simple case as in placing CMS Block.
Magento 2 bring complexity of development to a new
level.
3. How it works
Example (4):
Custom CMS block on Magento 2 Checkout
Solution:
By using UI Components, just like all other
components of Magento2 checkout.
3. Conclusion
Magento 2 Checkout looks simpler and nicer on
surface, but under hood things are not as nice.
Reality is that Magento 2 in combination with UI
components has just become much more
complicated than current Magento.
Magento will certainly continue with UI
components in further development
3. Conclusion
If you are frontend developer and you wish to work on
Magento 2 checkout, you will need to know these things:
● RequireJS - JavaScript dependency manager
● Knockout JS and UI Components.
● Understand Magento specific data-bind objects.
3. Conclusion
Thank you for your attention
Questions?

More Related Content

What's hot

Tech talk live alfresco web editor [compatibility mode]
Tech talk live   alfresco web editor [compatibility mode]Tech talk live   alfresco web editor [compatibility mode]
Tech talk live alfresco web editor [compatibility mode]
Alfresco Software
 
Alfresco Tech Talk Live-Web Editor - 3.3
Alfresco Tech Talk Live-Web Editor - 3.3Alfresco Tech Talk Live-Web Editor - 3.3
Alfresco Tech Talk Live-Web Editor - 3.3
quyong2000
 

What's hot (20)

12 Amazing Features of Magento 2
12 Amazing Features of Magento 212 Amazing Features of Magento 2
12 Amazing Features of Magento 2
 
The journey of mastering Magento 2 for Magento 1 developers
The journey of mastering Magento 2 for Magento 1 developersThe journey of mastering Magento 2 for Magento 1 developers
The journey of mastering Magento 2 for Magento 1 developers
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Guillaume Thibaux - Can we win the fight against performance bottlenecks? Les...
Guillaume Thibaux - Can we win the fight against performance bottlenecks? Les...Guillaume Thibaux - Can we win the fight against performance bottlenecks? Les...
Guillaume Thibaux - Can we win the fight against performance bottlenecks? Les...
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in Magento
 
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarksMagento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
 
Magento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | MagenestMagento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | Magenest
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
 
Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015
 
Html 5
Html 5Html 5
Html 5
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions Distribution
 
3.5 ness
3.5 ness3.5 ness
3.5 ness
 
Tech talk live alfresco web editor [compatibility mode]
Tech talk live   alfresco web editor [compatibility mode]Tech talk live   alfresco web editor [compatibility mode]
Tech talk live alfresco web editor [compatibility mode]
 
Alfresco Tech Talk Live-Web Editor - 3.3
Alfresco Tech Talk Live-Web Editor - 3.3Alfresco Tech Talk Live-Web Editor - 3.3
Alfresco Tech Talk Live-Web Editor - 3.3
 
Eclipse orion
Eclipse orionEclipse orion
Eclipse orion
 
Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?
Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?
Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?
 
Web component
Web componentWeb component
Web component
 
SAP WEBDYNPRO ABAP TRAINING
SAP WEBDYNPRO ABAP TRAININGSAP WEBDYNPRO ABAP TRAINING
SAP WEBDYNPRO ABAP TRAINING
 
Harness the power of XPages in Lotus Domino
Harness the power of XPages in Lotus DominoHarness the power of XPages in Lotus Domino
Harness the power of XPages in Lotus Domino
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 

Viewers also liked

The 7 Most Common Usability Issues
The 7 Most Common Usability IssuesThe 7 Most Common Usability Issues
The 7 Most Common Usability Issues
Kissmetrics on SlideShare
 
Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010
Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010
Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010
Steve Krug
 

Viewers also liked (20)

Meet Magento Belarus 2015: Igor Bondarenko
Meet Magento Belarus 2015: Igor BondarenkoMeet Magento Belarus 2015: Igor Bondarenko
Meet Magento Belarus 2015: Igor Bondarenko
 
Meet Magento Belarus 2015: Sergey Lysak
Meet Magento Belarus 2015: Sergey LysakMeet Magento Belarus 2015: Sergey Lysak
Meet Magento Belarus 2015: Sergey Lysak
 
Meet Magento Belarus 2015: Kristina Pototskaya
Meet Magento Belarus 2015: Kristina PototskayaMeet Magento Belarus 2015: Kristina Pototskaya
Meet Magento Belarus 2015: Kristina Pototskaya
 
Meet Magento Belarus 2015: Andrey Tataranovich
Meet Magento Belarus 2015: Andrey TataranovichMeet Magento Belarus 2015: Andrey Tataranovich
Meet Magento Belarus 2015: Andrey Tataranovich
 
Meet Magento Belarus 2015: Denis Bosak
Meet Magento Belarus 2015: Denis BosakMeet Magento Belarus 2015: Denis Bosak
Meet Magento Belarus 2015: Denis Bosak
 
Meet Magento Belarus - Davide Consonni
Meet Magento Belarus - Davide ConsonniMeet Magento Belarus - Davide Consonni
Meet Magento Belarus - Davide Consonni
 
Meet Magento Belarus - Alexander Kaigorodov
Meet Magento Belarus - Alexander KaigorodovMeet Magento Belarus - Alexander Kaigorodov
Meet Magento Belarus - Alexander Kaigorodov
 
Meet Magento Belarus - Viacheslav Kravchuk
Meet Magento Belarus - Viacheslav KravchukMeet Magento Belarus - Viacheslav Kravchuk
Meet Magento Belarus - Viacheslav Kravchuk
 
Meet Magento Belarus - Andrew Klochkov
Meet Magento Belarus - Andrew KlochkovMeet Magento Belarus - Andrew Klochkov
Meet Magento Belarus - Andrew Klochkov
 
Meet Magento Belarus - Thomas Fleck
Meet Magento Belarus - Thomas FleckMeet Magento Belarus - Thomas Fleck
Meet Magento Belarus - Thomas Fleck
 
Meet Magento Belarus - Andrey Tataranovich
Meet Magento Belarus - Andrey TataranovichMeet Magento Belarus - Andrey Tataranovich
Meet Magento Belarus - Andrey Tataranovich
 
Meet Magento Belarus - Andriy Samilyak
Meet Magento Belarus - Andriy SamilyakMeet Magento Belarus - Andriy Samilyak
Meet Magento Belarus - Andriy Samilyak
 
Meet Magento Belarus - Elena Leonova
Meet Magento Belarus - Elena LeonovaMeet Magento Belarus - Elena Leonova
Meet Magento Belarus - Elena Leonova
 
Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2
 
Lean Usability
Lean UsabilityLean Usability
Lean Usability
 
The 7 Most Common Usability Issues
The 7 Most Common Usability IssuesThe 7 Most Common Usability Issues
The 7 Most Common Usability Issues
 
Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010
Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010
Steve Krug: Lazy Person's Guide to a Better World - UX Lisbon 2010
 
10 Most Common Misconceptions About User Experience Design
10 Most Common Misconceptions About User Experience Design10 Most Common Misconceptions About User Experience Design
10 Most Common Misconceptions About User Experience Design
 
Death By PowerPoint Rus
Death By PowerPoint RusDeath By PowerPoint Rus
Death By PowerPoint Rus
 
Usability vs. User Experience: What's the difference?
Usability vs. User Experience: What's the difference?Usability vs. User Experience: What's the difference?
Usability vs. User Experience: What's the difference?
 

Similar to Meet Magento Belarus 2015: Mladen Ristić

UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2
Divante
 
White Paper - Magento 2.0 Performance and Scalability 03.31.16
White Paper - Magento 2.0 Performance and Scalability 03.31.16White Paper - Magento 2.0 Performance and Scalability 03.31.16
White Paper - Magento 2.0 Performance and Scalability 03.31.16
Patrick Kong
 

Similar to Meet Magento Belarus 2015: Mladen Ristić (20)

5 Great New Features of Magento 2
5 Great New Features of Magento 25 Great New Features of Magento 2
5 Great New Features of Magento 2
 
How upgrading to Magento 2.0 will fuel your growth?
How upgrading to Magento 2.0 will fuel your growth? How upgrading to Magento 2.0 will fuel your growth?
How upgrading to Magento 2.0 will fuel your growth?
 
UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2
 
White Paper - Magento 2.0 Performance and Scalability 03.31.16
White Paper - Magento 2.0 Performance and Scalability 03.31.16White Paper - Magento 2.0 Performance and Scalability 03.31.16
White Paper - Magento 2.0 Performance and Scalability 03.31.16
 
White Paper - Magento 2.0 Performance and Scalability 03.31.16
White Paper - Magento 2.0 Performance and Scalability 03.31.16White Paper - Magento 2.0 Performance and Scalability 03.31.16
White Paper - Magento 2.0 Performance and Scalability 03.31.16
 
Architecture and Analytical Study of Magento
Architecture and Analytical Study of MagentoArchitecture and Analytical Study of Magento
Architecture and Analytical Study of Magento
 
Prime Reasons Behind The Success Of Magento 2
Prime Reasons Behind The Success Of Magento 2 Prime Reasons Behind The Success Of Magento 2
Prime Reasons Behind The Success Of Magento 2
 
Magento 2 Migration Issues: Top 7 Most Common Challenges to Consider
Magento 2 Migration Issues: Top 7 Most Common Challenges to ConsiderMagento 2 Migration Issues: Top 7 Most Common Challenges to Consider
Magento 2 Migration Issues: Top 7 Most Common Challenges to Consider
 
What’s new in Magento 2? Main features.
What’s new in Magento 2? Main features.What’s new in Magento 2? Main features.
What’s new in Magento 2? Main features.
 
How Google Tag Manager changes everything you knew about website analytics
How Google Tag Manager changes everything you knew about website analyticsHow Google Tag Manager changes everything you knew about website analytics
How Google Tag Manager changes everything you knew about website analytics
 
Inventory management system
Inventory management systemInventory management system
Inventory management system
 
Magento
MagentoMagento
Magento
 
Eugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum PerformanceEugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
 
Migrating from Magento 1 to Magento 2
Migrating from Magento 1 to Magento 2Migrating from Magento 1 to Magento 2
Migrating from Magento 1 to Magento 2
 
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
 
Learn What Ecommerce Experts Love About Magento 2
Learn What Ecommerce Experts Love About Magento 2Learn What Ecommerce Experts Love About Magento 2
Learn What Ecommerce Experts Love About Magento 2
 
Introduction to Mangento
Introduction to Mangento Introduction to Mangento
Introduction to Mangento
 
Mangento
MangentoMangento
Mangento
 
How to install Magento 2 extensions.pptx
How to install Magento 2 extensions.pptxHow to install Magento 2 extensions.pptx
How to install Magento 2 extensions.pptx
 
Макс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
Макс Екатериненко - Meet Magento Ukraine - Magento 2 OverviewМакс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
Макс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
 

More from Amasty

More from Amasty (15)

Способы оптимизации работы с памятью в Magento 2
Способы оптимизации работы с памятью в Magento 2Способы оптимизации работы с памятью в Magento 2
Способы оптимизации работы с памятью в Magento 2
 
Magento Security from Developer's and Tester's Points of View
Magento Security from Developer's and Tester's Points of ViewMagento Security from Developer's and Tester's Points of View
Magento Security from Developer's and Tester's Points of View
 
A joyful shopping experience. Creating e-commerce sites that are effortless t...
A joyful shopping experience. Creating e-commerce sites that are effortless t...A joyful shopping experience. Creating e-commerce sites that are effortless t...
A joyful shopping experience. Creating e-commerce sites that are effortless t...
 
Follow up email_for_magento_2_user_guide
Follow up email_for_magento_2_user_guideFollow up email_for_magento_2_user_guide
Follow up email_for_magento_2_user_guide
 
Order Status for Magrnto 2 by Amasty
Order Status for Magrnto 2 by AmastyOrder Status for Magrnto 2 by Amasty
Order Status for Magrnto 2 by Amasty
 
Order Attributes for Magento 2
Order Attributes for Magento 2Order Attributes for Magento 2
Order Attributes for Magento 2
 
Shipping Table Rates for Magento 2 by Amasty | User Guide
Shipping Table Rates for Magento 2 by Amasty | User GuideShipping Table Rates for Magento 2 by Amasty | User Guide
Shipping Table Rates for Magento 2 by Amasty | User Guide
 
Customer Group Catalog for Magento 2. User Guide
Customer Group Catalog for Magento 2. User GuideCustomer Group Catalog for Magento 2. User Guide
Customer Group Catalog for Magento 2. User Guide
 
Product Parts Finder for Magento 2 | User Guide
Product Parts Finder for Magento 2 | User GuideProduct Parts Finder for Magento 2 | User Guide
Product Parts Finder for Magento 2 | User Guide
 
Edit Lock Magento Extension by Amasty | User Guide
Edit Lock Magento Extension by Amasty | User GuideEdit Lock Magento Extension by Amasty | User Guide
Edit Lock Magento Extension by Amasty | User Guide
 
Advanced Reports Magento Extension by Amasty | User Guide
Advanced Reports Magento Extension by Amasty | User GuideAdvanced Reports Magento Extension by Amasty | User Guide
Advanced Reports Magento Extension by Amasty | User Guide
 
A/B Testing Magento Extension by Amasty | User Guide
A/B Testing Magento Extension by Amasty | User GuideA/B Testing Magento Extension by Amasty | User Guide
A/B Testing Magento Extension by Amasty | User Guide
 
Store Credit Magento Extension by Amasty | User Guide
Store Credit Magento Extension by Amasty | User GuideStore Credit Magento Extension by Amasty | User Guide
Store Credit Magento Extension by Amasty | User Guide
 
Advanced Customer Segments Magento Extension by Amasty | User Guide
Advanced Customer Segments Magento Extension by Amasty | User GuideAdvanced Customer Segments Magento Extension by Amasty | User Guide
Advanced Customer Segments Magento Extension by Amasty | User Guide
 
Order Archive Magento Extension by Amasty | User Guide
Order Archive Magento Extension by Amasty | User GuideOrder Archive Magento Extension by Amasty | User Guide
Order Archive Magento Extension by Amasty | User Guide
 

Recently uploaded

Recently uploaded (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Meet Magento Belarus 2015: Mladen Ristić

  • 1. inchoo.net Magento 2 Checkout — Frontend perspective Mladen Ristić
  • 2. inchoo.net Magento 2 changes: ●New Layout Structure ●New File Structure ●New Frontend Responsive theme ●New Admin theme Checkout - most radical change on frontend
  • 4. 1. UI differences Main UI improvements (1): ● Reduced number of steps ○ Absolutely beneficial for user’s experience. ● Clean and simple interface ○ Easier shopping progress
  • 5. 1. UI differences Main UI improvements (2): Current Magento Onepage Checkout - 6 steps: ●Checkout method ●Billing information ●Shipping information ●Shipping method ●Payment information ●Order information
  • 6. 1. UI differences Main UI improvements (2): New Magento Checkout – 2 steps: •Shipping step •Review & Payment step New checkout can be a definite improvement if designers and developers have the knowledge and decide to follow this new approach. Benefits: •New customer can place order in less than 2 minutes •Increased number of successful orders
  • 7. 1. UI differences Other UI improvements ● Simplified header - less elements ● Removed footer ● Progress bar – navigation through steps. Possible improvement: ● Promo code on last Checkout step This shows that Magento 2 will be up to date with latest ecommerce best practices - At least on the surface.
  • 8. 2. Performance Loading time M1 vs M2 Checkout (1): Three years ago: ● More than 47% of people expect a web page to load in two seconds or less Today: ● 60% or more by today's standards ● Page load time can be two seconds, but less is almost mandatory
  • 9. 2. Performance Loading time M1 vs M2 Checkout (2): Page load time directly affects: ●Customers satisfaction ●Store revenue How seriously Magento 2 approached this topic? Performance results and comparisons: http://www.magemeter.com/benchmark/index
  • 10. 2. Performance Loading time M1 vs M2 Checkout (3): Magento 1 EE - Madison Island theme. VS Magento 2 Checkout - Luma theme. ● Test environment is placed on the same server ● 2 Mbit Internet connection ● With and without a browser cache.
  • 11. 2. Performance Loading time M1 vs M2 Checkout Results: Magento EE – [no cache] Magento EE - with browser cache Magento 2 - 1.0.0- beta [no cache] Magento 2 - 1.0.0 beta - with cache No. of requests 58 58 260 259 MB transferred 1.2 MB 166 KB 3.1 MB 845 KB Finish 5.66 s 4.61 s 35.14 s 8.81 s DOM Content Loaded 4.49 s 4.39 s 21.9 s 5.08 s Load 5.55 s 4.43 s 25.6 s 5.08 s
  • 12. 3. How it works As we have seen the new checkout on frontend looks much different than the current one, and also it is expected that some major changes had to happen under the hood.
  • 13. 3. How it works We are familiar with JavaScript in Magento - it isn’t a new feature in Magento. Current checkout depends heavily on JavaScript. New Magento Checkout = JavaScript application
  • 14. 3. How it works Main template file which Magento 2 uses for checkout: app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
  • 15. 3. How it works app/code/Magento/Checkout/view/frontend/templates/onepage.phtml <div id="checkout" data-bind="scope:'checkout'" class="checkout-container"> <!-- ko template: getTemplate() --><!-- /ko --> <script type="text/x-magento-init"> { "#checkout": { "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?> } } </script> <script> window.checkoutConfig = <?php /* @escapeNotVerified */ echo Zend_Json::encode($block- >getCheckoutConfig()); ?>; // Create aliases for customer.js model from customer module window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn; window.customerData = window.checkoutConfig.customerData; </script> <script> require([ 'mage/url', 'Magento_Checkout/js/model/step-loader', 'Magento_Ui/js/block-loader' ], function(url, loader, blockLoader) { loader.registerLoader(); blockLoader("<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"); return url.setBaseUrl('<?php /* @escapeNotVerified */ echo $block->getBaseUrl();?>'); }) </script> </div>
  • 16. 3. How it works One of two ways how Magento 2 initializes a UI component in a PHTML template: ● data-mage-init ● <script type="text/x-magento-init"> Official documentation: http://devdocs.magento.com/guides/v2.0/javascript-dev- guide/javascript/js_init.html.
  • 17. 3. How it works RequireJS call – dependency file loader ● Which files to load before rendering content ● In what order to load them After all required JavaScript files are loaded and all dependencies covered, then JSON object is generated. Knockout JS kicks in and starts with rendering page elements based on JSON object using HTML file: app/code/Magento/Checkout/view/frontend/web/templat e/onepage.html
  • 18. 3. How it works JSON? Checkout JSON object ● Holds checkout UI components ● Generated by a controller
  • 19. 3. How it works If you wish to learn more about this: JSON objects is construed inside checkout_index_index.xml Path: app/code/Magento/Checkout/view/frontend/layout/check out_index_index.xml Each element of checkout page with all options is dynamically created in form of a JSON object.
  • 20. 3. How it works JavaScript Knockout? It is a JavaScript library that helps to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically JavaScript KO can help you implement it.
  • 21. 3. How it works Example: Custom CMS block on Magento 2 Checkout After we get familiar with concept of rendering a new checkout let us try to add something new on checkout page. Something custom, for example CMS Static block from admin panel - one of simplest operation in current Magento.
  • 22. 3. How it works
  • 23. 3. How it works Example (1): Custom CMS block on Magento 2 Checkout In theory, to add static block you need to create XML file inside your theme. Like local.xml in current Magento. In our case we need checkout_index_index.xml inside path: app/design/frontend/Inchoo/theme/Magento_Checkout/layout
  • 24. 3. How it works Example (2): XML that didn’t work as expected <body> <referenceContainer name="content"> <block class="MagentoCmsBlockBlock" name="free.shipping" after="checkout.sidebar"> <action method="setBlockId"> <argument name="id" xsi:type="string">1</argument> </action> </block> </referenceContainer> </body>
  • 25. 3. How it works Example (3): Custom CMS block on Magento 2 Checkout Layout XML isn’t enough to manipulate new checkout page. Not even in simple case as in placing CMS Block. Magento 2 bring complexity of development to a new level.
  • 26. 3. How it works Example (4): Custom CMS block on Magento 2 Checkout Solution: By using UI Components, just like all other components of Magento2 checkout.
  • 27. 3. Conclusion Magento 2 Checkout looks simpler and nicer on surface, but under hood things are not as nice. Reality is that Magento 2 in combination with UI components has just become much more complicated than current Magento. Magento will certainly continue with UI components in further development
  • 28. 3. Conclusion If you are frontend developer and you wish to work on Magento 2 checkout, you will need to know these things: ● RequireJS - JavaScript dependency manager ● Knockout JS and UI Components. ● Understand Magento specific data-bind objects.
  • 29. 3. Conclusion Thank you for your attention Questions?

Editor's Notes

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29