Magento eCommerce – First Thoughts & Tips
Magento is an incredible open-source PHP eCommerce platform built around the idea of flexibility, and has been gaining a huge amount of traction over the last 18 months. Unlike “old” open-source solutions such as osCommerce, Magento was architected very carefully using OOP principles and MVC so that the entire system can be customized (both visually and functionally) without having to modify core application files. This ensures that future updates aren’t a pain, and that multiple extensions can live peacefully together.
I’ve been working with Magento for over a year now, and overall I’m extremely impressed. The architecture of the system is certainly very complex, but once you start to poke around and understand why there are so many different directories and files, and how everything is organized, you’ll love the flexibility that it creates.
The biggest complaint of Magento is the lack of documentation. From the wiki pages, to user guides, to source code comments, the documentation is severely lacking and often out-of-date. I hope this improves over time (I think it will). What I’ve found is that you can eventually figure things out, but the learning curve is just a little steeper than it needs to be. It is pretty necessary to understand many core concepts of Magento (how XML layout files are used, how data is stored, how template blocks and functionality interact, etc.) in order to correctly make even the simplest of changes. But once you get it, you can do a lot. I think the CMS ExpressionEngine does extremely well at this, in comparison, and they are both products aimed at similar audiences.
When I started developing on top of the Magento platform, I kept a log of some of the help things that I learned along the way, that I wish I had known upfront. Many of these tips seem obvious upon looking back, but I thought I’d share them for anyone just getting started programming or designing for Magento.
For everybody:
- Use the Wiki, Knowledge Base, and forums
- Don’t ever modify core Magento files! Seriously. This quick article is a must read for all beginners.
- To upgrade to a new version of Magento: just upgrade all of the components by using Magento Connect Manager. This is found in the admin’s System menu, or by adding /downloader to the Magento home page URL.
- To add Google Analytics: simply add your Analytics account profile’s tracking number under Config > Google API
- To setup PayPal IPN: there is no need to change IPN settings in your PayPal account. Magento automatically passes the IPN path with each checkout.
- Refresh the cache! If you make a change and wonder why it’s not showing up, use the dropdown on System > Cache Management. It’s helpful to disable the cache during development.
- Learn how to customize via XML
- After installing Magento with sample data and SEO URL rewrites, the same data shows up on the index page but many of the links are broken, even with my .htaccess file present. Solution: Refresh catalog rewrites in Admin > System > Cache > Refresh catalog rewrites
- Learn how to optimize and speed up Magento’s performance. It’s very slow by default but can be drastically improved. (I’ll be writing another blog post on this soon, but for now check out this thread.)
Design/theming tips:
- Read the Design Guide
- To figure out which template file to edit: turn on “Template Path Hints” through System > Configuration > Advanced > Developer > Debug > Template Path Hints = ON. This option is only visible if you change the “Current Configuration Scope” dropdown to a website (like “Main Website”) rather than “Default Config”.
- To switch to a theme (such as “Modern”), after downloading it in Magento Connect Manager, go to System > Design and then click “Add Design Change”.
Programming tips:
- Understand the architecture
- To debug and output PHP variables: set System > Configuration > Advanced > Developer > Log Settings- > Enabled = Yes. Then, from a CLI in your web root do “cd var/log/” and “tail -f system.log”. In PHP, you can say Mage::log(“hello world”); to write to this log.
- Locate the PHP error log when getting a blank/white page, or an error message. Mine was in public_html/error_log.
That’s all for now. If you’re looking for a Magento designer or developer, get in contact with me.
Magento eCommerce – First Thoughts & Tips | Phil Freo – Website … | Magento News said,
September 20, 2009 @ 6:14 pm
[…] Magento eCommerce – First Thoughts & Tips | Phil Freo – Website … […]
Magento eCommerce – First Thoughts & Tips Hello CMS - the best cms website said,
September 20, 2009 @ 7:59 pm
[…] more: Magento eCommerce – First Thoughts & Tips By admin | category: cms | tags: both-visually, little-more, modify-core, not-unexpected, […]
Technologies I’ve worked with in 2009 | Phil Freo - Website Design, Development, & Blog - Jacksonville/Gainesville, FL said,
January 1, 2010 @ 1:33 pm
[…] heavily with Magento customization and theming […]