Magento is difficult to modify and customize

17

Posted by nick | Posted in Magento | Posted on Feb 24 2009

Tags:

I’ve recently started a side project for a friend building an ecommerce solution that requires some customizations.  I’ve read about Magento and attended a presentation about it at ZendCon 2008 by a couple guys from Varien, the company that built Magento, and viewed a few of their sample sites.  Because I have years of experience with oscommerce ecommerce, I was eager to dive right in and customize one of these!  Unfortunately, it turns out Magento sucks to work on.  Yes, I said Magento sucks.

Features

Magento has nearly all the ecommerce features you could imagine.  It has pretty much everything that oscommerce ever had, even after installing a hundred community contributions. They support downloadable products, grouped products, different customer types (retail, wholesale) and pricing for each, and a variety of payment and shipping modules.  Magento has “current” features such as tagging and tag clouds and on the backend also has a caching mechanism to speed things up on the site.

Bugs

There are some bugs in Magento and this is expected with any software.  They’ve been releasing an updated version every 2-3 weeks.  I’m still waiting on the payment subscription feature and a bug fix that will allow me to assign downloadable products to a group product.

Interface

Looking over a Magento store from the front end and peering into the source code you’ll quickly notice it uses very few tables.  On a given page, there was one small table in one of the sidebar objects.  That’s it!  Very good for search engine optimization.

Admin

The admin took a little getting used to.  Especially the product configuration as it’s laid out a little differently than the oscommerce I’m used to.  The main problem with the admin is that it’s freak’in SLOW!!!!  The ajax page content thing is cool and all, but not when it takes a minute to refresh!  It’s ridiculous.  At one time I had four tabs open and three of them loading a page in the admin while I worked on another.  I’ve tried it in firefox and google chrome and after reading the forums, I’m not the only one with these troubles.

Modifying code

The code… well, sad to say, but the learning curve is extremely steep.  I’m not talking in hours or days… weeks is getting closer, and I’d feel comfortable with months if you’re putting in a few hours per week.  It would probably make things a hellava lot easier if you’re a Zend Framework master as Magento is built on top of the Zend Framework.  Look into the code and you’ll just dig into directories eight or ten levels deep.  Many of the directories contain sub directories with the same name, making things even more confusing.  Each sub directory may contain one to four files and each file has about 50 to 100 lines of code that seem to only call an object or set a variable.  Where is the meat and potatoes?  You know, the controller containing all the logic?  Oh, and the XML config files for every modules and chunk of code in the system are kinda cool, but I really don’t know how they work at this point.  Below is a screen shot from my Zend Studio looking at a project and a sample file.

untitled-12

Customizing

After looking at this code for an hour, I decided to try the old way of locating something in a file.  Yep, I went to the product detail page and copied the text “product description” that was printed on the page, then search the whole codebase for it.  Nothin.  Ok, it must be in the database somewhere, so check the database… damn… over 200 tables!  I tried this a few times and came up empty.

If you don’t have 100-200 hours to learn the Zend Framework and play around with Magento, then I’d say forget about making customizations to it.  Yeah, it’s open source, but not too many do it yourselfers (if any) are going to be able to modify and taylor this thing to their needs.  Sure, it’s an awesome piece of work, but take it as it is or find something else.

How they make their money

They build the most complicated open source package I have every seen… by far.  Sure, it’s open source and maybe they “gave back to the community”… no.  It’s obvious the first time you hit their website that they’re in this for big bucks.  They make it easy to download, but as soon as you need something altered, it’s damn near impossible for any casual coder.  It’s still a challenge for a PHP Expert and Zend Certified Engineer without the proper training and experience.  They do have a tutorial on “how to customize Magento” at http://www.magentocommerce.com/wiki/groups/174/changing_and_customizing_magento_code , which pretty much just tells you how to merge a new release into your existing one and show you how to create a module.  Professional installation currently goes for $149 from Magento.  I was able to install Magento on my local server, but it took some tweaking and working around a few of their bugs to get it to work.  Speaking of bugs, if you want support from them it’ll cost between $42 and $1500/yr.  Why not just look on the forums?  There are a zillion questions on their forums, but no answers.  Figures… you gotta pay for the answers. How about professional training?  Yes, they offer 19 hours of professional training for $1000. They’ve done a great job at ensuring they have jobs for a few years supporting this beast.

If you want to master this solution

  1. You need to be an object oriented PHP expert.
  2. You need an awesome IDE to work with that has intellisense. Zend Studio is a good choice. Don’t even think about using Dreamweaver here folks.
  3. Gain experience with Zend Framework.
  4. You must have a lot of time available to learn this solution
  5. Pay for their training and figure out how this damn thing works.

Thanks Varien for the cool product, but it’s not for me right now.  Don’t have the hundreds of hours to learn your system; there are much easier shopping cart solutions available.

  • Share/Bookmark

Magento mod_rewrite doesn’t work

1

Posted by nick | Posted in Magento | Posted on Feb 06 2009

Tags:

After installation of Magento and ensuring that mod_rewrite is enabled and working on my apache server, the Magento shopping cart still gives me the below error:

Whoops, our bad…

The page you requested was not found, and we have a fine guess why.
  • If you typed the URL directly, please make sure the spelling is correct.
  • If you clicked on a link to get here, the link is outdated.

The Fix

Log into the admin area and navigate to system->cache management.  Click the “refresh” button next to “catalog rewrites”.  That’ll fix’er.  It’s pretty dumb that this must be done on a fresh install, but it does the trick.

  • Share/Bookmark

Magento cannot log into admin

28

Posted by nick | Posted in Magento, Uncategorized | Posted on Feb 06 2009

Tags:

I experienced a problem just after my Magento install where the page would simply redirect back to the login without displaying an error message.  I’d login using the user credentials I just created during the install and I also tried using the default user “admin” with password “123123″ .  The trick was that I was installing on localhost and for some reason a cookie was not being set for the session.  I have other sites requiring a cookie on localhost, but Magento seems to have a problem with it.

The solution is to add the following line to your hosts file so you can access your localhost as www.localhost.com.

C:Windows\System32\drivers\etc\hosts (edit this file in notepad)
127.0.0.1        magento.localhost.com www.localhost.com

Also worth mentioning, if you need to reset a password manually in the database use the following:

UPDATE admin_user SET password=MD5(‘mypassword’) WHERE username=‘admin’;

If none of the above works, install the browser Opera and use it. Opera seems to work out of the box whereas IE, Firefox, and Google Chrome do not.

  • Share/Bookmark

Magento or Zen-cart for downloadable products?

0

Posted by nick | Posted in Ecommerce, PHP | Posted on Jan 11 2009

Tags: , ,

A friend of mine wants a shopping cart for his downloadable products (images and music).  I’ve worked on oscommerce for a few years now (1 year full time) and know that the code is crap.  Oscommerce is dead, period.  The code is unmaintainable.

Zen-Cart

I know Zencart is based on oscommerce as the database is pretty much the same and it has most of the same interfaces.  Zencart is a cleaned up oscommerce, but let’s face it, to really clean up oscommerce you need to start over from scatch.  Setting up a downloadable product with zencart is a hack in itself.  Here are two tutorials I found showing you how to do it -   http://www.imakewebsites.ca/zen-cart-downloadable-products/ and  http://tutorials.zen-cart.com/index.php?article=71 .  After the customer has made their purchase, here is the download screen they’ll use to access the file. You’ll find the list of available downloads scrunched in the middle of the page below.

Magento

Today was my first experience with Magento.  The installation was more difficult than Zen-cart and the database is 212 tables as compared to 95 for Zen-cart.  I’ll admit my eyes glazed over looking at the database and the code library today.  Everything with Magento is mod rewrite so when you see mysite.com/customer there really isn’t a customer directory in the code.  Magento is like wordpress where you don’t modify the code if you want updates and support.  Magento offers paid support programs and customizations… maybe that’s why they made is so damn confusing.  Magento is cutting edge PHP; it’s built on the Zend Framework.  The interfaces of Magento are modern and don’t look like something that came from back when the internet was born.

How to specify that a product is downloadable and upload the downloadable file.

Customer’s view of downloadable products after making a purchase.

In my opinion, Magento is the clear choice going forward.  Here’s my analagy of comparing Magento to Zencart… it’s like comparing a new car to a twenty year old car.  The new car looks better, has better features, and outperforms the older car in every way.  From a developer’s perspective, when you look under the hood of Magento (at the code and database), you’ll feel overwhelmed and will realize there is a lot to learn.

  • Share/Bookmark

Magento Commerce “Object Not Found”

1

Posted by nick | Posted in Magento | Posted on Jan 10 2009

Tags:

If you just installed Magento and receive an “Object Not Found” 404 error with ever link you click, it’s because mod_rewrite is not enabled on your server.  Tell your hosting provider to turn it on if you’re on shared hosting.  If you’re using XAMPP, here how to do it .

  • Share/Bookmark