I've been having a particularly bad day with Magento today and I'm feeling in a ranty mood, so here goes.
Magento is a PHP online store "application", designed to be "enterprise". Three things in that sentence should make you want to scream. As far as I can tell, it's designed to generate billable hours for the parent company who offer ridiculously expensive support packages and ridiculously expensive custom development. My previous contract was cutting up a skin into it. It has a strange concept of 'layout documents', whereby you describe how given 'blocks' fit together in which order on which pages through an xml format that does all sorts of strange things (like mixed case tags for example -- it has special magic regard casing patterns and automatic inflection of certain things etc.). So for that particular job, the client wanted to shift everything out of the 3 column layout into a one column layout. Most pieces of software, this would be easy in, in Magento, we had to move a bunch of xml chunks around. But wait, it can't possibly be that easy. Every template has an associated class with behaviours pulled depending on what template it's being put in -- I had to rewrite a whole load of code, just to move them into the main column. Top it off with every class having an unintelligible inheritance hierarchy, and the account manager nearly had his head kicked in. For another page, we wanted to move something from the left to the right column. I copied and pasted the html into the main column template and used CSS to float it to the right instead. This saved me about 8 hours of work at the cost of a bit of messy code. Client gets what client wants. That contract eventually finished, and I've never been more glad to get shot of a piece of software. Until this contract, that is. This time, the client wants to do some really crack-fuelled things, including integration with another system via SOAP. Roll on magento event handlers, whereby you write two xml documents in order to get it to call 5 lines of php. Of course those xml documents have undocumented magic, and you'd better hope you choice of name for an event interceptor doesn't clash with the name another module you're using has chosen since they SHARE THE SAME NAMESPACE. And if you forget to specify a section naming your module, it assumes it's a continuation of the previous module, despite being in a completely seperate directory and being in fact, nothing alike. And then by the magic of you ovveriding things, when the hook is called, it's silently trying to call back methods on the wrong class. Really helpful when your hook is for payment and payment is misconfigured on the development server. On the bright side, I now have lots of diaries for next year and about 5 subscriptions to the same magazine. So pretty hateful, I'm sure you'll agree. But it gets worse. The default distribution of this software is designed to handle conversion between character sets properly. Which is why it always fouls up when you want to do something crazy like generate a PDF of the order, because who'd want to be able to print order information? Better hope noone with accents in their name wants to use your store. And then even if you do do that, they ship a font for the pdf generation that doesn't support large blocks of characters (particularly absent are japanese, and of course the client's client has a large japanese user base to make things more interesting). But wait, there's more. The client wanted shipping to be handled by weight. Each item is priced according to weight and the total added up. Magento adds up the weights and then prices the end result up as one cost. There is no checkbox for this. Worse, the shipping system is designed to make it as difficult as possible to work outside of this pattern of flow. Aside from all the xml and php editing i attempted, it just seems they're really, really keen for you to not be able to write a module that frankly, isn't that complicated. And finally, the cacheing. Because of all that XML, it implements some ridiculously heavy cacheing. And provides an imperfect means to clear it. And there are other caches you have no control over (e.g. the modules cache, whereby you have to go to the modules page and save the settings of your existing modules before it will notice you've added another module). It's just a gigantic ball of hate and it dragged me off my lunch TWICE today to fix the fucking thing. FOAD.