Upgrading Magento - theming

For all of those developers out there using Magento 1.0 the upgrade to 1.1.3 is fraught with theme issues but the performance gain is more than worth the effort.

Currently, I am developing a catalogue site using a modified theme based on the Modern theme. Magento have done a great job on the overall system but the Magento theme system more complicated when compared to the theme systems employed by Drupal, wordpress et al. So be warned that any changes you make to your theme will have to be re-constructed for each Magento release until such a time that Magento PHP function and helper calls within themes are minimal.

Drupal's theme system is one of its strong points as it keeps presentation separate from core functionality so you can quickly update either the underlying code or the presentation without many issues. Drupal works by rendering output of core functionality combined with structural mark-up which can then be overridden using a master template file. All you have to do is open the core Drupal files and search for a function beginning with theme_ then within your master template file you simply copy and paste the complete theme_ function and rename the function to your theme name before editing the function i.e. for this website the function names begin with jnorton_ - the name of theme you are looking at. This makes it easy to theme the core functionality without actually changing the top level design template or the low level core functionality. The master template file serves as a middle man or intermediary between the top level HTML structure and the underlying code, to summarize: it is easy to use and update.

For more information regarding the Drupal template system and in particular the theme system I use to develop Drupal websites then visit the Drupal PHPTemplate page. For those of you who are recreating Magento themes then there isn't a great deal of help I can offer you besides reveiwing the upgrading Magento themes for latest releases page and running througha few best practice tips, namely:

  1. Back up all Magento source files and the database!
  2. Create a dev install of Magento using your backed up Magento source files and database. Then upgrade the dev install to the latest version - DO NOT use your live website.
  3. Upgrading through Magento Connect is hit and miss, but by all means try this as you may get away without any issues. Alternatively, just download the latest Magento archive and upload the decompressed archive to overwrite your dev install.
  4. Finally, upgrade your dev database to the latest version by navigating to your dev install's home page. This should automatically upgrade your database to the latest version.

After completing these steps you will have a safe development platform from which to update your themes and custom modules without impacting on your live shop.

Good luck!