·

magento 2

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

Magento’s Magical Getters and Setters demystified

For those of you who are already familiar with Magento 1 or 2, this article will tell you nothing new. For those who are new to Magento, this article is fundamental information for almost every class in Magento. If you are one of those pupils that are new to Magento, keep on reading… Getters and Setters read further ...

Events and Observers in Magento 2

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

1 2 3