Let's talk about code

Hi, I’m Michiel. I’m a professional programmer for more than a decade. I work mostly in PHP and javascript, mainly in Magento and Laravel. I write testable code and love to give testing workshops to you and your colleagues. You can hire me for freelance/consulting jobs.

Contact me Hire me

Blog

Magento 2, Quick Tip

Retrieving orders using the Magento 2 API

Recently i had to fetch order information using the Magento 2 API, and to be more specific: The latest orders with a specific status. This turned out to be a bit harder than i initially expected. Magento has some pretty good documentation on this subject, but i still needed a little bit tinkering to get the right result.
Magento 2, Layout XML, Quick Tip

Conditionally hide or show a block in Magento 2

Somehow i only found about this little gem only recently. In your layout xml you can use the ifconfig parameter to hide or show block depending on your configuration. It works as following.
Continuous Integration, Integration test, Magento, Magento 2, Testing

Debugging the Magento 2 integration test setup

You might have been at the same point where i have been a few times: You want to start with integration tests on an existing Magento 2 store. You follow the steps to setup your IDE, start the first test and wait. After a while you get one of these nasty non descriptive errors:
Freelancing, Shopify, Laravel

My Shopify app got approved!

So in a previous blogpost i already told that i was working on my own product. Well this is a Shopify app and last Friday it finally got approved to their app store. In the blogpost from januari i thought it would released within a few weeks, but it took a bit longer. This was on one hand due to having to wait for the Shopify approval process, on the other side due to lack of time from my side. But it's finally here.
Cloudflare, Laravel, Laravel Forge, WordPress

Wordpress, Cloudflare & Laravel Forge

This always bites me when setting up a Wordpress site on Laravel Forge: You get a redirect loop. This article is therefor mostly written for myself.
Controller, Magento 2, Quick Tip

Download a file in a controller in Magento 2

Today i had to create a file download from a Magento 2 controller. I turnes out that this is quite simple. Now, it's good to know that there are 2 options here.
Control Alt Delete.nl

Control Alt Delete.nl is moving!

So a few months ago i was doubting about my freelance career. In the mean time things become more clear for me and i have found some new clients who gave me some freedom in my work, for which i'm very thankful. The last ~6 months i was working mostly from home. This is great and has some big benefits, but can be lonely at times. There are also a lot of distractions at times. So i decided it was time to look for an official office.
Magento 2

How to check if a user is logged in in Magento 2

Recently i had to do something very simple: Show a button in the product listing page of a Magento 2 depend if the use was logged in or not. Just do a $session->isLoggedIn() one would say, right? It turns out that this is way more from the truth than i initially though.
Magento, Quick Tip

Flush Magento Cache vs Flush Cache Storage

This is question is asked and answered on Stack Overflow before, but it always surprises me how many people still don't know the difference. The difference is quite simply though.
Code Sniffer, Composer, Magento, Open source, PHPStorm

Using the Magento Marketplace MEQP with PHPStorm

To get your extension in the Magento Marketplace you have to comply with there rules. One of these rules is that your code must pass their Magento Marketplace Extension Quality Program Coding Standard, or Marketplace EQP in short. This is a set of custom Code Sniffer tools which inspects your code on quite a few common mistakes. For example: