Add a main menu entry in Magento

This is how you can add a main menu entry to the Magento main menu in your modules adminhtml.xml:

Attention: As you can see, you have to define the right ACLs for the menu (@see Implement ACL (Access-Control-List) for own Magento modules)

Associative arrays (hash, dictionary) on bash

This is how to create associative arrays (hash, dictionary) on bash:

This script was made to purge the varnish on one of my clusters. But the important stuff is the declaration of the associative array with  DOMAINS['LIVE']="www.ask-sheldon.com"; and how to access the values of the array (with  REQUEST_DOMAIN=${DOMAINS["$1"]};). “$1” is the array key to select the value. By the […]

Widget definition for BE form fields in Magento

The general widget definition for BE form fields in Magento is:

The following snippets show how to define different form fields for the widget form: Template selector:

Fixed template:

Text input:

Enable / disable select:

Multiselect (customer groups):

Category Selector:

To determine the category ID and load the […]