[Magento] WTF Magento?

In my time as a programmer expanding on other’s projects I’ve seen a lot of stupid. Four months into a project with Magento it’s turning out to have more stupid than most. For fun I’m going to start off a log of Magento stupidity. Some of it I’ve figured out work arounds for. Others, not so much.

Our starting entry is the pinnacle of stupid (or pretty close). For whatever reason, if you have a product object in the checkout cart, it will not have all the properties that a product object has if you pull it up from the catalog listing page. Most critically, I need the request_path element, which is part of a product when it is in a catalog list. It is not present when the product is on a checkout cart page, and it is not present when you pull the product object out of the model controller.

Why is this stupid? Well, for one I can’t link to the product page from the checkout page without it. More importantly, intuition expects an object to have the same properties no matter what it’s context. Otherwise, why use OO design at all?

Magento is designed for obfuscation and bloat. It is one of the worst eCommerce product I’ve seen ( Well, technically OSCommerce is worse, but Magento is much younger and its designers should have been able to learn the lessons that venerable piece of software provides).

On which object properties you are looking at? in shopping cart you likely have simple product, so you will not find methods available for configurable or grouped product. By adding to shopping cart you are adding a specific product, with specified color, size or whatever attribute you have chosen. There is a method that you can call on your $_product to get instance of preferable product for example configurable and all the method will be available then.