Categories


Recent Posts


Archives


Addresses from the Customer Object

The Magento object for interacting with customers (Mage_Customer_Model_Customer, alias customer/customer) has three address fetching methods, but you probably only want one of them. The first, and least useful, is getAddressCollection. You might think this method would return a Magento Address collection containing address objects [...]

astorm

Betting Long on Palm, HP, and WebOS

There is no company capable of releasing a tablet computer device that can compete head on with Apple Inc.'s iPad. Apple's core technology (touchscreen, responsive UI), deals with the entertainment industry (Record Labels, Pandora, Netflix, and their ilk), and ability to skip the

astorm

Symlinks with Templates in CE 1.6

Magento Version: 1.6.rc1+ I just downloaded the release candidate for Magento 1.6, and I noticed a change that seemed like a regression, but a little digging made me realize it was something else. A lot of Magento developers (meaning me) like keeping their custom phtml files somewhere other than the the standard add/design/frontend file [...]

astorm

One Line Observers

I’ve started creating single line observers like this <?php class Mycompany_Mymodule_Model_Observer { public function someMethod($observer) { Mage::helper('mycompany_mymodule/observer') ->someMethod($observer->getCustomer()); } } The logic is punted to a helper class. This way the helper receives only the objects it needs [...]

astorm

SQL Headquarters

There’s more sophisticated ways of logging and profiling SQL in Magento these days, but sometimes it’s still easier and quicker to drop down to the abstract Zend adapter and log your queries with a few discrete calls to Mage::Log Almost every INSERT, UPDATE, SELECT, and DELETE goes through the methods in [...]

astorm

We have an extension that uses Ajax to change what shipping rates are shown in a weekly date/time grid @webshopapps, in response to my question “Hey magento people, are there are any extensions (free/paid) that add Ajax features to the checkout page?”

astorm

PHP Patterns in Magento

In many programming languages, especially the less strictly typed ones, a common coding pattern starts to emerge. $thing = $this->getSomeThing(); if($thing) { //do something with the thing } Without a compiler to catch methods returning what they shouldn’t, a developer is forced to sanity check return values from methods before [...]

astorm
email hidden; JavaScript is required