If you have ever worked in a team or in any other way had to maintain others people code, you already know how important is to write maintainable code. Actually, this doesn’t need to be others people code at all – if you are trying to modify your year-old-code, you may already forgot all the details around it and it may be hard for you to read it, let alone modify it. Read more
After the great season of Meet Magento events such as Spain, Greece, Poland and many others, we have decided to close this years season of conferences with something different. For this occasion, my colleague and I had a unique opportunity to visit a MageTestFest. It was a 4-day coding event focused solely on testing. Read more
Session is something that PHP developers use in their everyday work. But how many of you did took some time to actually consider where are they stored and how does that impact your application? Should you even care? Does number of sessions influence performance of your application? Read more
In case you haven’t noticed, Magento 2 recently marked all model CRUD operations as deprecated, in favor of following repository pattern. This article will be a short overview for those who are new to this concept. Read more
Every Magento developer has at least once encountered situation where long lasting module upgrade script caused issue for end customers. Or even worse, fail over and over, due to being executed multiple times.
Of course, there is a very simple solution for this. And since we have encountered many sites which do not use this approach, I have decided to share it with you. Read more
This is a revised article originally written in September 2014 when I started to play with Magento 2 for the first time. Since there were a lot of changes in Magento 2, this article also needed some refreshment. We will glance over the backend, and proceed with the development of a simple module. For this task, I picked up the payment gateway API integration. This relatively simple task will help us demonstrate some key changes in Magento 2.
More precisely, we will be focusing on implementation of Stripe payment gateway. Even though Stripe has a rich set of features, here we will be focusing only on most basic functionalities to get you started with Magento 2 extension development. Read more
One of the biggest changes in Magento 2 is the usage of dependency injection design pattern. With this pattern, a lot has been changed inside codebase, and many new things have been introduced. In this article, I will try to explain the very basics of this design pattern, and its implementation in Magento 2 to help those who are beginners in the field of dependency injection. Read more
In this article, I will demonstrate how to write custom shipping in Magento, or to be more precise, two of them: standard shipping and express shipping, which is only available if none of your cart items exceeds specified weight threshold. Lets start by explaining how Magento handles shipping, and what would be needed to achieve our goal. Read more
If you are developing in Magento, sooner or alter you will need to obtain some information from database. This article will show you how to retrieve almost anything using getModel, getData and getter methods in general. Read more