·

How to

Tips & tricks, tricks & tips. Looking for a way to achieve something? Here’s how to do it!

How to style the checkout/onepage/success page in Magento 2

It’s a common problem: you want to style, template or test the order success page, but each time you refresh the page Magento 2 redirects you to the cart page. This is the default behaviour of Magento 1 & 2: when you’re order is complete, you’re only allowed to see this page once. Refreshing the read further ...

Adding custom category attributes to Magento 2.1

Magento 2.1 was released several days ago, and oh boy … Much has changed! I mean, just look at the release notes! If you’re already working with Magento 2 and you’ve added some custom attributes to your categories, you might have noticed that your tab with options is no longer there. Simply because all tabs aren’t read further ...

How to properly calculate FPT/WEEE on configurable products in Magento 2

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 ...

Quickly run scripts in the shell in Magento 2

Magento 2 has a great functionality for running scripts in the command line, but sometimes you just want to quickly check something without creating a new CLI command or creating a unit test. Wouldn’t it be great if you could just write a PHP script and write some simple code in it, just to speed read further ...

Unit Test your custom module in Magento 2

Magento 2 comes with a great set of unit tests out-of-the-box. You can add these tests to your module as described by Ash Smith in this article, but that means you need to run your unit test with the –filter  attribute like so: This is great of course, but it still means the entire test read further ...

Magento 2 : Use custom source models for multiselect product attributes

Source models in Magento 2 are very simple. They simply are classes that return a list of properties. A very basic example: You can use this source model in configuration files or in the source_model-column of your EAV attribute. But … When you want to use multiselect instead of select, you might encounter the read further ...

Magento 2 : Add a product attribute to all attribute sets programmatically

When a Magento 2 shops grows, it gains more and more attribute sets. Adding new attributes to all attribute sets might become a cumbersome task. Especially when you first have to do it on your local development environment, and once again for your test- and production environments. Seems not very DRY to me. So why read further ...

Utilising Magento 2’s CLI Possibilities

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 ...

How to add a custom renderer to the admin grid in Magento 2

So you want to add a custom render to the admin grid in Magento 2 huh? Well, today I was faced with just that same task: One parameter of my custom model was a reference to the manufacturer ID. So the manufacturer ID is stored in the database, but in my grid I wanted to read further ...

1 2 3 10