Posts Tagged ‘tips’

Magento database model without an auto_increment primary key

August 3rd, 2010

When you create a model in Magento that reads and writes data ( $model->load() and $model->save() ) to a database table, by default, Magento expects the primary key of the table to be an auto_increment field called ‘id’. If you want to use a primary key that is not an auto_increment field then you need to [...]

Magento debugging tips

August 3rd, 2010

This helped debug some problems I was having with observers not doing what I was expecting. Login to your Magento admin and enable logging: Configuration | Developer | Log Settings | Enabled = Yes Add Mage::log() statements to your code. For example, in your observer callback: Mage::log(“My special observer called”) Watch the log files. In Linux, [...]

Removing Windows from a Dual-Boot System

November 28th, 2007

I’ll try to keep this brief but I wanted to post it because I couldn’t find exactly this procedure anywhere online. Here’s my situation: when I installed Ubuntu I didn’t just repartition my Windows drive—I added a whole new hard drive for it. So I ended up with Windows XP on /dev/sda1 and Ubuntu on [...]

Dear Rookie Web Developer

May 18th, 2007

Dear Rookie Web Developer, I had the task recently of taking over a project from a group of developers (who shall remain nameless) who were unable to finish it. When I saw what they had written, I could see why. The project had clearly been assigned to inexperienced, junior-level developers who did not have the [...]