2009

Custom Magento error page

Sometimes, the unthinkable happens and an error occurs in your Magento system, causing everything to come grinding to a halt. Magento handles this by displaying a styled error page, which is better looking than a white page full of error text. However, the error page still doesn't look very professional, and potentially discloses information that could be abused by a malicious user. This post details a method for using a custom error page, and outlines some of the benefits of doing so. Read more →

Preventing PO Box shipping addresses

Recently, I wrote a blog post about preventing PO box customer addresses being registered at checkout. Following on from that post, I was asked a rather sensible question: "is it possible to disallow PO boxes for shipping, but allow them for billing?" The answer is yes, but it does require a few more modifications to Magento. As mentioned in the original post, the if statements with regular expressions required to block PO boxes and locked bags are as follows: Read more →

Online Retailer Expo & Conference 2009

Online retailing is a rapidly growing market and it is becoming an increasing necessity for anyone in retail in the 21st century to establish an online presence. Recognising this, National Media, a specialist B2B media and marketing company, are holding the inaugural Online Retailer Expo & Conference, which will focus on the state of eCommerce in Australia. It will also be a chance for retailers and vendors to make connections, share knowledge and ideas, and explore new business opportunities. Read more →

Internet Explorer 6 Browser Sniffing

Sometimes to make advances in software one must break backwards compatibility. Nowadays, Internet Explorer 6 (IE6) is a dinosaur of a browser. It's slow, non-standards compliant, lacks features and is a pain to develop for. As web developers, time constraints and other considerations frequently mean it's just not worth putting in the extra development effort to support it. In those cases, we will want to detect those visitors using IE6 as their browser so that we might explain that it is not supported and offer an alternative. Read more →

Magento CMS static blocks

Static blocks in Magento are a useful way of making elements of your site easily configurable by administrators. If you have sidebar blocks, headers or other elements that can change from time to time, using a static block can be easier in the long run than hard-coding them. Static blocks are very simple to create. In the admin backend, just go to the CMS menu and select Static Blocks. Click on the Add New Block button to create a new block. Read more →

Magento on the Mac

Magento is a web-based application, and therefore Magento development is thankfully not limited to any particular platform or operating system. As a Mac user I prefer to do my Magento development on my Mac. In setting up my development environment, I discovered that there are very few useful resources out there for other developers looking to do the same. So hopefully this post will serve as a start for others looking to do the same. Read more →

Debugging Magento with Xdebug

Diagnostic print_r statements and logging might be quick and easy tools for investigating what Magento is doing, but a full debugger offers a lot more power and flexibility. This post demonstrates how to set up the xdebug debugger for use with the vim editor. First of all, I'd like to thank Box.net for their great Xdebug tutorial. Check it out for a more in-depth look at using Xdebug and vim. Read more →

Customised Magento review summary

There is little doubt that product reviews are popular with online shoppers, and are playing an increasingly important role in purchasers' buying decisions. Magento includes a solid feature set for implementing product reviews and can show them on various pages that include product listings. You may find that you want to customise the way these reviews are displayed, but the best way to do this may not be immediately obvious. Read more →

Magento debugging - loading blocks, layouts and config files

Occasionally I've needed to take a closer look at exactly which block, layout or config file is being loaded by Magento. In this post I will demonstrate a "brute force" approach to checking exactly what is being processed. Please note: Where possible, we will be using Magento's logging, the output of which will be written to the file var/log/system.log, which also includes the rest of the system logging output. Logging must be enabled for output to be written to this file - you can enable logging in the Magento admin panel by going to System → Configuration → Developer → Log Settings and setting Enabled to True. Read more →

Definitive Magento installation guide

While getting started with Magento some time ago, I thought it would be a good idea to write a post that started at the beginning: how to install it. Reading through the Magento forums, I get the impression that Magento users have extremely varied levels of web development and systems administration experience. That raises the question of the amount of detail to include in a post aimed at Magento newcomers, since experienced web developers will need only the important steps, whilst those new to web development will prefer more info. Read more →