Just because you can do anything in a template doesn’t mean you should. Some of you might already know the S.O.L.I.D way of programming. If you haven’t, it’s really interesting stuff if you want to be a better programmer. And besides that, the S.O.L.I.D principles can be found throughout Magento 2. The S in S.O.L.I.D read further ...
So I recently asked an interesting question on Magento Stack Exchange, because I was running in a problem: I was given the task to export a plain TXT list with SKU’s and a status of some sort. I wanted to be cool and learn something new so I decided to utilize Magentos’ web API functionality read further ...
Magento 2 is packed with a lot of cool design patterns. Most of them you might already know, like dependency injection or interceptors, because they are well-known and well- documented. There are however much more design patterns in Magento 2 that are also worth using. One of these patterns that I use regulary in my read further ...
There are various articles about how to programmatically import images in Magento 2. This method relies solely on service contracts and is in my opinion the “Magento Way” to do it: Note that we don’t copy our image whatsoever, but make use of an ImageContent object. This is a new layer of abstraction in read further ...
Recently I stumbled on another nice ‘feature’ of Magento 2. When applying Fixed Product Taxes (FPT) in Magento 2, the functionality seemed a bit … broken. I was trying to apply different FPT’s on the simple children of a configurable product. A client of ours sells refrigerators and their models come in various sizes. We’ve read further ...
Just like Magento 1, Magento 2 offers different ways to achieve your goal in your webshop. One of these things are all the events dispatched by Magento. So before you start rewriting models, overriding templates or adding new classes, chances are that you can get things done, just by listening what Magento has to offer. In read further ...
Some of you might already know this, but I’m a great fan of the command line. In web development, I use PHP to write CLI scripts more than often. They provide a great way if you need to perform quick tasks on the server, or if you want to perform tasks after a deployment. If read further ...
One feature of Magento that is not as often used as it should be are widgets. Widgets are configurable blocks that can be added to the content in wysiwyg editors in the admin. This gives us great possibilities to add rich content with the wysiwyg-editor without having to manually edit the HTML code. Because having your client read further ...
Just like Magento 1, Magento 2 has blocks. For those who don’t know what Magento blocks are: they are classes that template (parts) can use to gain some specific functionality. Blocks are used throughout Magento and are a core part of it’s design and will most likely also be a part of your customisations. So read further ...