Dec 21, 2016

Best Advice to Extend Magento 2 Checkout

Best Advice to Extend Magento 2 Checkout
Your custom PHP classes no longer require to extend core Abstract or Parent classes like we used to do it in Magento 1.

This is a continuation of Checkout tips where I started sharing tips about Magento 2 Checkout module.

Checkout is flexible now

Checkout as a single page application is implemented in a way where customisations take place. What I mean by that? Let me explain.

Your custom PHP classes no longer require to extend core Abstract or Parent classes like we used to do it in Magento 1. "Custimisability" of new Checkout has been achieved by using Composition, Strategy, Builder design patterns on both server and frontend sides.

Tips extending Checkout

Let me share with you 7 ways to effectively customize Checkout in Magento 2. You may need this tips if you are planning to do a custom development or bring new theme which should also be applied for Checkout.

There are 2 sets of techniques or features to change user experience on frontend side or persist and process data on backend side. Lets talk about frontend first.

It is common to change layout or UI Components before Checkout page will be served and rendered in browser. What can we use to modify frontend.

UI Components

Usage of checkout_index_index.xml file which is used to declare structure of UI Components in a tree way manner. As we always use xml to say that we have child node. You may find example of adding new UI Component for Payment validation article.

JavaScript Mixins

JavaScript Mixins are also powerful way to change behavior or look and feel of a page. It is like Plugin or Interceptor feature in PHP world but with small differences. Custom mixin can intercept JavaScript function and provide its own logic for execution.

Layout Processors

Layout Processors are used when initial list of declared UI Components should be modified before these components are rendered on a page. Since all components declared in layout file are static declarations, Layout Processors provides dynamic way to modify it.

Best advice for developers from Magento Master

If you want to get real advice from one of Magento Masters, Phill gave an interview to Magento. I enjoyed reading it and especially the advice for other developers: Control your aspiration! There will be always developers who know more than you, what you can control is hard work and time you can invest into your own life. Super advice.

Best advice for developers from Magento Master

New Magento 2.1.3 and 2.0.11 Release

It is time to check and update to latest Magento 2.1.3 or Magento 2.0.11 version where 90 bug fixes have been introduced. This is one of the best releases since Magento 2 GA with respect to marketing, communication, quality and number of fixes.

New Magento 2.1.3 and 2.0.11 Release

If you like what you are reading, subscribe to The Devletter: Magento Tips and Workshops email I send every week.

Thanks.

the devletter magento 2 checkout

Share Article

Related Articles

Comments

Next Article Previous Article

Join Devletter Community

Subscribe to FREE Magento 2 tips and tutorials email I send every week.

I will send you my 3 best tutorials with interesting content immediately.

LinkedIn Twitter Facebook