Archives of Magento 2

Magento 2’s Automatic Dependency Injection

This week’s article is the second in a series discussing Magento 2’s object system. Last time we covered the basics of Magento’s object manager. This week we’re going explain why you’ll rarely use Magento’s object manager, as well as Magento’s implementation of the popular “dependency injection” pattern. (hint — they’re related) Many popular PHP frameworks implement a dependency […]

Magento 2 Object Manager

Magento 2 brings a slew of changes to the table for an experienced Magento 1 programmer. While you can still see bits and pieces of Magento 1 (EAV, areas, blocks, etc.), the new Magento 2 core team has spent the last few years swapping out the startup fueled internals of Magento 1 with a more mature, […]

Magento Mode

Magento has 3 modes when running. To show the current mode, we can use this command: $ php bin/magento deploy:mode:show After running this command, we will se the current mode that we are using:   You can run Magento in any of the following modes: default Enables you to deploy the Magento application on a single […]

Part 5: Adminhtml

This is part 5 of my ‘Magento 2 Module From Scratch’ series. I’d recommend you catch up with the rest first. Today I’m covering the admin area section of our module. In here, we add links to the main menu, create our grid using the UI Components in Magento 2, create mass actions, and the ability to […]

Part 4: Frontend Controllers, Blocks and Templates

So far in the series we have created our model, resource model and database schema. It’s finally time to create something which we can see! It’s time to setup our controller, blocks, layout and templates! Let’s start with our controller! You may have already read my blog post on creating a controller in Magento 2, so […]

Part 3: Setup classes & databases Skip to end of metadata

In the last part of the series we cover creating our model & resource model so that we can interact with the database. However, we haven’t yet created our table! This part of the series will soon fix that! I separated this into it’s own post as I felt it needed it’s own post! In […]

Part 2: Models & Resource Models

Today’s post is going to cover a fair bit, so grab yourself a cuppa. We’ll be covering: Models Resource Models At the end of this post you will have successfully created your first Service Contract, along with your Model, and Resource Model. A lot of this will feel familiar from Magento 1.x. So don’t worry, […]

Part 1: Magento 2 Module Setup

If you’re here, then you are going to be just excited as I am about creating a full blown Magento 2 module from scratch! This part of the series I’ll be covering how to setup your module so that it can be installed via Composer. To install a module via Composer we’ll need to set […]

Magento 2 module from scratch – Introduction

Magento 2 is quickly becoming something us Magento developers need to learn pretty rapidly as we’ll soon be expected to start building our clients stores on the platform and building extensions. I wanted to take the opportunity to create a simple set of posts which will go over, at a bit of a high level, […]

Git Workflow in Magento Development

I. Overview Nowadays, there are many git workflows for development teams. The suitable git workflow for a specific team and projects depends on some elements like: scale of the project, size of the teams, the complexity of the business… Git supports many ways and commands for us to manage git progress. But when the project becomes […]