·

Magento

It’s one of the most used e-commerce solutions out there today. Here’s my 2 cents about it.

Magento unit testing with specific customers

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

Unit testing Magento with the database

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

Change Magento configuration on the fly

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

Create an install- or upgrade script in Magento that creates a static block

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

What to do when Magento isn’t translating your themes’ translate.csv file

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

Dependencies in Magento Widgets

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

Import customers in Magento blazing fast

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

How to create a Magento module

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

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

1 2 3 4 5 6