Magento: Loading the product from a template

When I wrangle with Magento Commerce and customize anything, every other bit is of course tied to a product’s ID, or sometimes entity ID. The challenging part is that whenever you’re in a template in Magento, the scope is very different from the previous one. This is sometimes frustrating, but when you think of it — it makes sense. That is, in Magento! ;-) Magento works in blocks and each block is basically a class file, of course $this is never the same....

November 24, 2010 · 2 min

Find space hogs and prettify output using AWK

I really love awk. You might disagree and call me crazy, but while awk might be a royal brainfuck at first, here’s a very simple example of its power which should explain my endorsement. Figuring out space hogs Every once in a while I run out of diskspace on /home. Even though I am the only user on this laptop I’m always puzzled as of why and I start running du trying to figure out which install or program stole my diskspace....

September 18, 2010 · 3 min

Installing Varnish on Ubuntu Hardy

This is a quick and dirty rundown on how to install Varnish 2.1.x on Ubuntu Hardy (8.04 LTS). Get sources setup Add the repository to /etc/apt/sources.list: Import the key for the new repository: Installation Update sources list and install varnish: Files of importance: Double-check: Further reading I recommend a mix of the following websites/links: Varnish 2.1 documentation Wiki with lots of tutorials and examples Team Soundcloud’s varnishtop (code on Github) Fin That’s all!...

September 14, 2010 · 1 min

Selenium & Saucelenium: installation and dbus-xorg-woes

We’re about to launch a new product, and this time it’s pretty client-side-intense. The application is powered by a lot of JavaScript(-mvc) and jQuery, which do xhr calls to a ZF/CouchDB powered backend. While js-mvc has unit-testing sort of covetred, I was also looking for some integration testing, multiple browsers and all that. Selenium vs. Saucelenium I can’t really say if you want one or the other. Revisiting Selenium in general, it’s IMHO the only viable and suitable thing for a PHP shop....

September 7, 2010 · 2 min

Tumblr: Display a list of entries in the sidebar

Update 2010-09-06: I turned my JavaScript code into a handy plugin for jQuery — let me introduce: jquery-simplerss. So for whatever reason, on a lot of blogs (but not mine ;-)), the sidebar also contains the list of latest entries on said blog. I recently edited a template for a client and he requested the same feature — which put me through three hours of nightmare. Tumblr Tumblr is a hosted blog service....

September 2, 2010 · 3 min