browse the blogs

[ 28 Nov 2015 ]

This is quick, high level, possibly incorrect, overview of how Magento 2 runs applications, and what the kernel of its system architecture looks like. This is the level above MVC/MVVM, and will only be of interest to folks (like me) who need to know how everything works.

From a high level point of view, Magento 2 is an abstract operating system for creating PHP applications, or what I’m calling “Magento System Applications”.

Magento 2’s top level architecture is relatively simple.

First, your web server (apache, nginx) routes PHP requests to a single PHP script/entry point. This PHP script is responsible for

  • Loading a PHP bootstrap script. This bootstrap script normalizes the PHP environment (including requiring in the composer autoloader)

  • Creating a Magento\Framework\App\Bootstrap

[ 19 Nov 2015 ]

One thing that keeps biting me in the trnasition from Magento 1 to Magento 2 is that sometimes the etc folder has an area hierarchy.

For example, in Magento 1, you system configuration file (respoisble for building out a module’s configuratioin UI) lived in


In Magento 2 this file lives in


Magento 2’s way make more sense (and reflects that the “area” system is well thought out), but it takes a little getting used to. If you’re not seeing the configuration changes, check to make sure your file’s in the right spot.

[ 19 Nov 2015 ]

Magento 2: Serializing a Category Tree as Primitive Types:

Fence post towawrds understanding Magento’s Service Contracts. (Service Contracts underly the new API system)

[ 16 Nov 2015 ]


Interesting extension I stumbled upon during a consulting gig. Lets you — via a UI — add columns to many of Magento’s backed UI grids based on the fields avaiable in the collection.

[ 23 Oct 2015 ]

The following steps are, as of October 22, 2015, the quickest way to get a working version of Magento 2 up and running without checking out the source from GitHub. The following will install the merchant beta – which is a stable, mostly feature complete version of Magento 2. There have been changes to the Magento 2 source since this beta, but the merchant beta is the best way to get a taste of what Magento 2 is like, and how its programmatic systems work.

Once you’ve tried Magento 2 like this, you can try checking out the entire source tree from GitHub and installing Magento 2 using the stable master branch. Once you’ve done that, you …

[ 16 Oct 2015 ]

Here’s another gotcha to be careful of when using the sales/quote model objects. If you pass the following methods

  • setBillingAddress, setShippingAddress, assignCustomerWithAddressChange

an existing quote address object, these methods will reassign the address to the current quote (removing it from the old quote). If you were anything like me, you probably wanted to create new address objects based on the existing quote address objects, and then assign those.

[ 13 Oct 2015 ]

Here’s another caution sign if you’re using the sales/quote object’s deleteItem or removeItem method. If you look at the code that marks an item for deletion

if ($item->getHasChildren()) {
    foreach ($item->getChildren() as $child) {

$parent = $item->getParentItem();
if ($parent) {

In addition to removing the item you asked about, Magento will remove any child items (members of a bundled product) or any parent items (the bundled parent if you remove a specific child item of the bundled product). Likely the right behavior (although I could argue for an exception being thrown if you try to remove a child item), but one that leads …