SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Knoxville TN
    66 Post(s)
    0 Thread(s)

    [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).

  2. #2
    SitePoint Member
    Join Date
    Aug 2012
    0 Post(s)
    0 Thread(s)
    Quote Originally Posted by Michael Morris View Post
    if you have a product object in the checkout cart, it will not have all the properties that a product object has
    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.
    Last edited by TechnoBear; Aug 15, 2012 at 11:21. Reason: Fixed quote


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts