Posted by & filed under TYPO3.

TYPO3 4.2 E-Commerce book cover image I was recently asked to review a new book from Packt Publishing, TYPO3 4.2 E-Commerce, written by Inese Liberte and Edgars Karlsons. TYPO3 is an excellent content management system designed for all types of websites, but there is very little information about building e-commerce shops – until now that is. While my TYPO3 experience is very recent, my e-commerce background dates back to late 90’s – so I was very excited to read this book.

First, let me state that although the book title implies the book is written for TYPO3 version 4.2 (which is deprecated now), the content applies equally well for the most recent version of TYPO3 4.4 (same is the case for my book). Second, I expected this book to be targeted at TYPO3 integrators – programmers who need to set up shops. Instead, this book is aimed at small, DIY business owners, trying their foot in e-commerce. The preface promises to walk the reader through setting up the site from scratch to build a profitable web presence. This is somewhat conflicting, as I found that some knowledge about TYPO3 is already required to begin reading this book.

One major issue I stumbled across is the lack of coherent flow in the book. This causes the reader to jump back and forth, as some sections don’t make sense until after subsequent chapters are read. This also leads to a lot of repeated content, and in general makes the book tough to follow. Let me walk through the chapters of the book and provide a better path to follow.

Chapters 1 & 2 cover basic TYPO3 installation, upgrades, templates, typoscript, and extension installation. Enough typoscript is given to confuse a newbie, so these chapters should only be read after some experience with TYPO3 basics. Likewise, if you’ve built a TYPO3 powered site before, you can safely skip this section.

Chapter 3 delves into the core of the book and describes the available commerce extensions. The description is very light, but the reader is instructed to consult the extension manuals for more information. The main extension chosen for the rest of the book is tt_products. Setting up a test paypal account is covered in detail, however most of the details of integrating it with TYPO3 and tt_products are left missing.

Chapter 4 starts by covering content import from CSV files, which is a bit premature at this point. It then explains adding new product using standard TYPO3 record editing features, and explains how to add a tt_products content element to a page. This is a chapter I would recommend rereading after experimenting with the shop setup.

Chapter 5 jumps into user registration, and covers frontend users and user groups. For commerce specific information, the book explains how to setup discounts for returning users.

The next chapter, chapter 6, diverges into menus, sitemap, navigation, and search. A lot of typoscript code is presented, but very little is explained, so the reader is expected to have a good foundation of typoscript at this point.

Chapter 7 provides a very light coverage of order management – something I would have liked to see more of, as it is arguably the most important step in the e-commerce flow after making a sale. No workflows, supply chains, or customer notifications are mentioned. The chapter also covers the basics of SSL and its integration into TYPO3. It also describes payment addins – something that was promised in chapter 3.

Chapter 8 gives an overview of the backend administration. Very little commerce specific information is given, and ideally this chapter should follow the installation chapter. Experienced TYPO3 users can safely skip this chapter.

Chapter 9 gives a top level of SEO optimization techniques. This is a topic that whole books could be, and have been, written on. Some TYPO3 specific information is given, but I would have preferred to see more.

Chapter 10 closes out the book by providing general tips for e-commerce, starting with basic business principles and ideas, and ending with site layout. This information is great for shop owners, but not for technical implementers. No TYPO3 specific information is given.

I was disappointed in not finding any information about TYPO3 and Magento integration, as that is a very popular topic. Unfortunately, its not covered at all in the book.

As a summary, if you were just starting out your TYPO3 e-commerce journey, I would recommend that you get some other introductory TYPO3 books (Building websites with TYPO3 by Michael Peacock and TYPO3: Enterprise Content Management at the minimum). Only then will you have a good foundation for this book, but then some of the chapters would become irrelevant.

If you want to see the language and type of information covered in the book, you can download a sample chapter.

TYPO3: Enterprise Content Management

Posted by & filed under Web 2.0.

I’m back from the f8 conference in San Francisco, and here are some of my thoughts and observations.

Facebook introduced some new ideas, and expanded the existing products. The big announcements were centered around the Open Graph. It essentially allows you to treat any content on the web (identifiable by a unique URL) as an object in the graph. Users can interact with objects, “liking” them and thereby adding them to their profile and subscribing to status updates. This essentially takes Facebook interaction into the open web. It will be interesting to see how this concept evolves, as Facebook definitely hasn’t thought it through completely – specifically issues with duplicated objects from different sources.

Implementation of Open Graph objects is very simple, done through meta tags identifying the object and linking them to the administrator profile or application. Facebook also provides simple social widgets, specifically the like button, activity stream, and recommendations list. These widgets can be included as a simple iframe on any page, and show user’s friends interaction with the site, without requiring the user to login through Facebook Connect, as was previously the case. You can see examples of social widgets on

Another big announcement was the Graph API. This is essentially a rewrite of the old API methods available on the Facebook in a simple, REST based fashion. The API centers on the concepts of objects and connections, and is self described through introspection, which allows the developer to see the connections available for the object. The object can be anything within the facebook system – and by extension on the open web through Open Graph. Furthermore, real time API updates ping your system when there are updates to the user data, so that you can take appropriate action. Authentication is based on oAuth 2.0 standard, and is much simpler than current implementation. Permissions are now simplified in one dialog box presented to the end user asking for very granular permission level the application needs.

Smaller, but still crucial updates came in areas of search, Facebook credits, analytics & insights, policy, and more. It’s too much to discuss here, but Open Graph has been the theme of the conference, and all updates center around the idea. Facebook is clearly moving in this direction, and is using its highly active user base to change the way we interact with the web.

Posted by & filed under TYPO3.

My book is about to be released, and some promotional materials have been released into the open to help readers evaluate the type of material covered, and writing style. Here are the tutorials that have been released:

I’m curious as to how well this material represents the book. Let me know your thoughts!

Posted by & filed under TYPO3.

TYPO3 4.3 features a new caching framework, which has been backported from FLOW3. The framework (should one choose to use it – more on that later) allows placement of default TYPO3 caches in DB tables, files, memcached, APC, or any other backend that can be created by implementing a PHP interface.

But even more – TYPO3 extensions can easily leverage this framework to cache their output, configuration, or anything else they need to cache. Furthermore, the choice of backend is left up to the individual installations. Some may decide to use DB tables, others files, yet some others will go with an in-memory caching system, like memcached, or APC. Choice of storage would be completely transparent to the extension, which will simply use the framework regardless of the backend.

Given all the caches TYPO3 offers, why would you want your own cache? Reasons vary. If your extension is a USER_INT object (which is not cached), but it queries the database, or external resources, you should use caching in your extension. Should the extension be used on a high traffic page, you don’t want it to become the point of contention.

In this simple guide, I’ll cover some basics of enabling caching in your extensions. I’ll assume you’re running TYPO3 of at least version 4.3.0, and your extension lists this as a dependency. If it doesn’t, make sure to surround all code using the caching framework with checks for TYPO3 version (use t3lib_div::compat_version() function), and test on all supported TYPO3 versions.

First you need to define the cache. Add this to the ext_localconf.php:

// If cache is not already defined, define it
if (!is_array($TYPO3_CONF_VARS['SYS']['caching']
   ['cacheConfigurations']['my_extension'])) {
      ['cacheConfigurations']['my_extension'] = array(
      'backend' => 't3lib_cache_backend_DbBackend',
      'options' => array(
         'cacheTable' => 'tx_myextension_cache',
         'tagsTable' => 'tx_myextension_cache_tags',

We use the database cache as the default. So we need to define the cache tables:

CREATE TABLE tx_myextension_cache (
   id int(11) NOT NULL auto_increment,
   identifier varchar(128) NOT NULL DEFAULT '',
   crdate int(11) unsigned NOT NULL DEFAULT '0',
   content mediumtext,
   lifetime int(11) unsigned NOT NULL DEFAULT '0',
   PRIMARY KEY (id),
   KEY cache_id (`identifier`)
CREATE TABLE tx_myextension_cache_tags (
   id int(11) NOT NULL auto_increment,
   identifier varchar(128) NOT NULL DEFAULT '',
   tag varchar(128) NOT NULL DEFAULT '',
   PRIMARY KEY (id),
   KEY cache_id (`identifier`),
   KEY cache_tag (`tag`)

Of course, any installation can overwrite the default definition by writing the definition in localconf.php:

   ['my_extension'] = array(
   'backend' => 't3lib_cache_backend_MemcachedBackend',
   'options' => array(
      'servers' => array(''),

Since the ext_localconf.php in our extension is included after localconf.php, the extension needs to check that the caching definition is not already defined.
Now in your extension you need to create and initialize the cache object:

if (TYPO3_UseCachingFramework) {
   // Create the cache
   try {
   } catch(t3lib_cache_exception_DuplicateIdentifier $e) {
      // do nothing, the cache already exists
   // Initialize the cache
   try {
      $this->cache = $GLOBALS['typo3CacheManager']->getCache(
   } catch(t3lib_cache_exception_NoSuchCache $e) {
      // Unable to load

$this->cache will now hold the cache for your extension. You can now check if the cache has a certain ID:
If it does, retrieve it:
If not, then generate the content and store it:
$this->cache->set($id, $content, $tags, $lifetime);

See the interface for more operations you can perform on the cache. The greatest thing about the caching framework is the fact that the specific caching backend is completely transparent to you – and each installation can use whatever method they deem appropriate, without any changes to your extension.

Posted by & filed under News & Politics.

Got this ad in Facebook today:

Huh? “Like to Travel?” – damn right. “Visit Moscow” – you got my interest. “We have jobs everywhere” – awesome!

Wait, what’s that note about mafia? Mafia Wars? Is that where the jobs are?

Is Russian mafia recruiting me through Facebook?