·

categories

How to get the categories linked to a product in Magento 2

This might seem like a no-brainer at first. I mean, come on! We all know we can just do $product->getCategoryIds() and move on from there right? You know, create a collection and stuff… But beware! This is not ‘The Magento Way’ on how to do this. I’ve recently posted an interesting question on Stack Exchange, 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 ...

Get Magento category URL without loading category

If you want to get the URL of Magento without actually loading the model, you can use Magento’s core URL rewrite functionality to fetch the URL without all too much load on the database like this: I had to use this nifty trick once when I had to load a category tree that consisted read further ...

Get the sibling categories in Magento

Looking for an easy way to find the sibling categories in Magento? I know I was! But then I stumbled upon this neat little trick. Try this: Thanks go out to Tim Bezhashvyly for this neat little trick.read further ...