Load a Category and it’s Products
There will come a time when you’ll want to programmatically work on a category or it’s products. Let’s first look at loading a category: In the above example, we’ve also included the store ID. This isn’t strictly necessary if it’s already defined in the scope of your code, but if you’re working outside of Magento it’s vital (especially if you have more than one store). Once your category is loaded, you’re free to use it’s attributes and even change and save them. Now let’s grab the products for this category….read more