UI components


Add static content in Magento Checkout address form

static content m2 checkout inchoo feat

If you are reading this, you are probably looking for an easy way to add static content to the Checkout address fieldset.

If you open the Magento Checkout module, you will notice technology complexity of the Magento Checkout. When you consider Knockout, HTML, PHTML, XML, JS – such a mix of technologies can often make a simple straightforward task seem super complicated.

Usually, if you need to edit something on the Checkout, you need to create a custom module, which will override the Layout Processor. This approach makes sense if the Checkout modification is complex and there needs to be some kind of a dynamic.

But for simple tasks, such as updating input placeholders, adding the notes to the inputs or adding the text between inputs – custom modules are an overkill.

Let me share with you a simple frontend solution for situations when we need to add some text or an image banner, for example between the Last Name input and the Company input.

Read more

How to improve usability for Magento 2 add to cart process

How to improve usability for Magento 2 add to cart process

Magento 2 introduced a new and improved way for adding products to the cart. The system now offers complete asynchronous (ajax) process, although the process itself is not activated in default application state. It requires some manual adjustments in the script call inside the templates. Someone would think, ok, we will simply modify the template script calls and that’s it! We successfully improved the process. Unfortunately, not so fast! There is still more room left for improvement. If you’re interested, let’s find out what’s left on the table.

Read more

Magento 2 Widgets – gallery widget explained – client testimonials showcase

Magento 2 Widgets – gallery widget explained – client testimonials showcase

Further to our previous post about Magento gallery widget (in which we explained how to build image gallery) we’d like to show another possible use of this widget. Because it’s based on Fotorama plugin, gallery widget is able to work not just with images but with other HTML content as well. And we’ll demonstrate how by building a client testimonials gallery which we’re going to display in the footer of our web shop.

Read more

More/Less functionality in Magento2

More/Less functionality in Magento2

While working on a Magento 2 project for our client, I was supposed to create more/less button, which is not part of neither Blank or Luma themes. The button should be on product page, but only inside of Details tab on desktop (accordion on mobile), which displays product description field in Admin.

Before we get started, I have created a custom theme (Inchoo/MoreLess that is extending Blank theme), make sure to update the correct path for your theme as we go along. The code was written on latest (2.1.6) installation with sample data.

Read more

Magento 2 UI components and listener

Magento 2 UI components and listener

In this short and simple example we will explain how to create listener in Magento 2 UI component. We will explain it on built in Magento 2 UI component Columns which use component Magento_Ui/js/grid/listing (part of admin grid interface).

Read more

Extending Magento 2 default JS components

Extending Magento 2 default JS components

Since Magento 2 is out for quite some time now and new projects based on the platform are rapidly approaching, there is no doubt that we, as developers, need to be adequately prepared for the challenge.

In this post I will demonstrate how to deal with platform’s default javascript components (widget instances). More precisely, a javascript component responsible for the site main navigation functioning. If you’re interested, just keep reading.

Read more