Category dropdown element

To get an treelike drop-down option field for all existing categories in the system you have yo add an own source model:

Now you can just use this source model in your modules system configuration file to generate a category selection:

For more information about system.xml field definitions have a look at the blogpost System configuration […]

Prevent unwanted email delivery

If you have multiple instances of a Magento shop – for example a staging and a production environment – sooner or later you’ll come to the point, where you need to  synchronize the database from live- to stage-system to get realistic production-like application behavior. In this case it is a good idea to prevent the system from sending mails […]

“Could not resolve host” error

If you get this error message when trying to update the system (see example below) or just pinging an external host …

… you have to declare an default route:


Deliver status 503 with you Python CGI-script

I’ve searched a lot for a solution of this simple looking problem. I found a lot of irritating and confusing information about this on the WWW. From implementing a socket-application to setting up an self-made HTTP-server. But the answer is much simpler:

The empty line after the “Retry-After” Header is very important!

Run Python on Apache CGI

To run Python scripts as Apache CGI scripts you have to install and activate the apache cgi module (Ubuntu 12.04):

And you have to add the following directive to your Apache configuration file:

After that you should restart the Apache:

That’s it! Have fun and do magic stoff 😀