Sometimes you have the situation where you have to write unit tests for Magento that involves Magento customers. If – for example – you have some business logic that depends on certain customer- (or address-) attributes, you want to make sure your code works as expected before you’re deploying it to a live server. Unit testing read further ...
This year I want to dive more into unit testing in PHP. Writing good, test-driven code is important for the stability and guarantee of your project, but it also helps you – as a developer – sleep a little better at night. You might have seen earlier posts regarding unit testing in PHP in the past, read further ...
Sometimes you have a situation where you need to change the configuration of Magento on the fly. Just for your single request, without saving it. This can be easily done with the Magento configuration Model: If you want to change a configuration value on the fly on store-level, you can do this as follows: read further ...
Ever been in the situation where your next update for your clients’ Magento installation requires adding a new static block? Don’t feel like logging in on the live site and doing it manually? Just add this little code snippet in your setup- or update-script to create that static block on the fly: The only read further ...
In some instances, Magento has multiple modules trying to translate the same item. Take the string “Add to Cart” for example. In Magento the modules Mage_Catalog , Mage_Checkout , Mage_Reports , Mage_Sales , Mage_Tag , Mage_Wishlist and Mage_XmlConnect all try to translate this string. What helps in those cases is to specify which translation of which module you are trying to overrule. read further ...
Did you know that when you’re creating a Magento Widget, you can show or hide specific fields according to the values of other fields? These are called dependencies, and are actually pretty easy to implement.read further ...
Recently I had the challenge to import customers from an existing OsCommerce installation into a new Magento setup. Initially, I tried it the Magento way, but very soon I stumbled upon a little problem: the amount of customers was over the 160.000, and importing it with Magento models would take 4 or 5 days! And then read further ...
Since I’ve written various posts now where I assume that the reader already knows how to create a Magento module. But for those who don’t, here’s a little how-to.read further ...
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 ...