AIAIO: Our Blog

AIAIO: Our Blog

The pulse and reviews of Alexander Interactive

Archive for September, 2010

Chromium + instant = predictive page loading

We’ve been recently sending in our predictions for the next 15 years as a follow up to yesterday’s blog post by Alex.  I was going to send in “Google will predict the page you want to go to and automatically load it”  However, to my surprise, since I had enabled --enable-match-preview as a parameter of my Chromium startup, I started experiencing just that.  When I type in “j” it automatically loads Jira in the background (see image).  I didn’t tell it to, it just figured it out based on my history.  With Google instant saving 2-3 seconds per search and Chromium bypassing search completely, we’ll have more time to make awesome websites!

Technology

Ecommerce predictions

This morning I enjoyed re-reading Clifford Stoll’s 1995 Newsweek piece, Why Web Won’t Be Nirvana.  While 15 years later most of his observations on information overload and the lack of content curation abound, how delightfully wrong he was in predicting the failure of “cyberbusiness.”

Then there’s cyberbusiness. We’re promised instant catalog shopping—just point and click for great deals. We’ll order airline tickets over the network, make restaurant reservations and negotiate sales contracts. Stores will become obselete. So how come my local mall does more business in an afternoon than the entire Internet handles in a month? Even if there were a trustworthy way to send money over the Internet—which there isn’t—the network is missing a most essential ingredient of capitalism: salespeople.

It appears our industry has done a fine job addressing all of Stoll’s concerns, save for thankfully not making stores obsolete (and arguably positioning great multi-channel retailers even stronger because of their web businesses).  We certainly can point and click for great deals.  I don’t remember ordering an airline ticket in the last 10 years and not doing it online.  OpenTable can almost always snag a last minute reservation for me at the latest NYC hotspot.  While their usability leaves a great deal to be desired, web-based contract negotiation tools drive billions in global procurement.

And speaking of a “trustworthy way to send money over the Internet,” while we haven’t yet found nirvana, in 2009, $209.6 billion was spent by consumers typing credit card numbers into a white box on a website.  People trust sending their money over the Internet.

Sure, we lack nuanced salespeople in our digital world.  That saleswoman who tells me I look fabulous in that suit will never lose her job to ecommerce.  But we sure do come close to the same results.  On more than one occasion we’ve all experienced that bizarrely efficient and shockingly accurate “others who purchased” recommendation, and went for it.  Dynamic personalization is the salesperson of the future, and she’s being implemented today in almost all of our modern ecommerce work.

It sure is easy to criticize Stoll with the 20/20 vision of hindsight, and most unfair not to offer ecommerce predictions for 2011 and beyond of my own.  Stay tuned to this page in the coming weeks.

Ecommerce

Why Redesign?

So you’re probably thinking to yourself right now, “Why Redesign?”

Gosh. Funny you should think that, because it just so happens I recently wrote a little piece on that exact subject, as a featured blogger on Building43.com.

Redesigning a website is a daunting task.  Budget, deadlines, resources, features, content, platform changes, brand perception, SEO implications – the list of challenges is a long one.  The potential impact website redesign has on your organization is as enormous and critical as the process.  Will conversion go up or down?  Will your new site attract more visitors or will traffic drop off?

If you want more detail on the topic, take a look at a deck from one of my presentations at Internet Retailer’s Web Design 2009 conference, Charting the Successful Redesign — A True Story About an Agency and Client Partnership. It gives a detailed account on the site redesign, specifically what led to the decision and the steps we took to execute it. It does NOT go into pancakes and the secrets behind achieving a remarkable fluffiness. Lets just make that clear from the outset.

Charting the Successful Redesign of an Independent Ecommerce Small Business — A True Story About an Agency and Client Partnership

Ecommerce

Using widgets outside of the CMS in Magento

Magento ships with widget functionality that lets you build out data models and then reuse them on product and CMS pages. If you want to use these in a custom template however, you are out of luck. This can be done by extending the Widget Collection class.

Create the following directory structure: app/code/local/Mage/Widget/Model/Myswql4/Widget/Instance

Copy app/code/core/Mage/Widget/Model/Myswql4/Widget/Instance/Collection.php into your new directory

The Mage_Widget_Model_Mysql4_Widget_Instance_Collection comes with a store filter but thats about it. To be more usefull we are going to add a type filter, a title filter, and a sorter.

 
class Mage_Widget_Model_Mysql4_Widget_Instance_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
{
    /**
     * Constructor
     */
    protected function _construct()
    {
        parent::_construct();
        $this->_init('widget/widget_instance');
    }

    /**
     * Filter by store ids
     *
     * @param array|integer $storeIds
     * @param boolean $withDefaultStore if TRUE also filter by store id '0'
     * @return Mage_Widget_Model_Mysql4_Widget_Instance_Collection
     */
    public function addStoreFilter($storeIds = array(), $withDefaultStore = true)
    {
        if (!is_array($storeIds)) {
            $storeIds = array($storeIds);
        }
        if ($withDefaultStore && !in_array(0, $storeIds)) {
            array_unshift($storeIds, 0);
        }
        $select = $this->getSelect();
        foreach ($storeIds as $storeId) {
            $select->orWhere('FIND_IN_SET(?, `store_ids`)', $storeId);
        }
        return $this;
    }
    
    public function addTypeFilter($type) {
    	$this->getSelect()->where('type=?', $type);
    	return $this;
    }
    
    public function addTitleFilter($type) {
    	$this->getSelect()->where('title=?', $type);
    	return $this;
    }
    
    public function addAttributeToSort($attribute, $dir='asc') {
    	$this->getSelect()->order("{$attribute} {$dir}");
    	return $this;
    }
}

Now we should be able to query any widgets from any template in our system:

< ?php
$wids = Mage::getModel('widget/widget_instance')
	->getCollection()
	->addTypeFilter('masswidget/list')
	->addAttributeToSort('title', 'asc')
	->load();

foreach ($wids as $wid):
	$params = $wid->getWidgetParameters();
	echo $params['custom_param'];
	echo $wid->gettitle();
endforeach;
?>

Technology