Tagged: category

Magento 2 get current category 1

Magento 2 get current category

This is about how to get current category in Magento 2. Products are organized in Magento 2 and sometimes you need to know from of for which category you are executing PHP code. It...

magento 2 get category by url_key 0

Magento 2 – get category by url_key

In this short tutorial I show you how to get category by url_key for your Magento 2 shop. This is sometimes needed if your shop already has a category tree and you want to...

magento 2 export categories 6

Magento 2 – export categories

Magento 2 has no export categories option in backend. It is strange, that no one has implemented this, but as developer we can do it by our own. I show you a simple script...

magento 2 delete categories programmatically 5

Magento 2 – delete categories programmatically

In this tutorial I show you how to delete categories programmatically. This is a task you do not use for production systems, but is quite nice if you run tests on your development system....