Web Development for 2010

Alexander Dickson - Web Developer covering PHP, jQuery / Javascript, XHTML, CSS, more

Thoughts on PHP ecommerce

Published on Tuesday, 22nd June 2010.

Ecommerce with PHP is a funny thing. There are a few open source packages out there, but there is no one true package.

I've developed a number of sites in osCommerce, and I'm sure I do not need to tell you just how painful that is. I've even converted an osCommerce site from table to CSS based layout. Dreary days those were. Do you know how osCommerce adds a border to a table? With the border attribute perhaps? Oh no, not even close. They nest a table within another, with a padding of 1px and set the outer table's background. Ingenious! There had to be a more modern solution.

Magento came around and everyone was excited. They promised so much, and at the start they seemed to deliver. Then came the realisation that Magento was slower than a rug on valium on any shared host. After banging your head on the wall about that, the second painful thing was the templating. Magento uses a clever XML based layout system. Need I say more? Obviously for a small store Magento was massive overkill.

PrestaShop is a fairly modern ecommerce system utilising PHP & MySQL. Whilst I have only had the chance to spend a few days with it, I'm mostly liking it so far. The theming is generally pretty sane, using Smarty to render the dynamic data in .tpl files. The template files don't offer much in the way of customising the markup, most of it has to be done within the modules folder, which is not tied to any theme. So modifying a product layout will affect all templates. There is a little niggle in the back of my mind that there should be an easier way to edit an individual module's view file and have it tied to a template. Perhaps they could use a cascading file system like Kohana.

There is one more cart I'd like to mention, OpenCart, of which I have had no hands-on experience with. I have found it interesting to read the lead developer's interactions with other people. One thing that has turned me off the project is the lack of care for security, or more specifically, CSRF. Update: This appears to be fixed in the new demo.

Comments

  • Luuk de Waal Malefijt

    Posted on Wednesday, 30th June 2010 @ 10:20pm.

    Perhaps someone could decouple the Ubercart Module from Drupal; That module has it all. (Except for the easy templating methods perhaps...)

Leave a Comment

Comment Details

Your email will never be displayed. If you have a gravatar, it will be displayed.

Note: Your comment may require approval before it is posted to the site.

Stack Overflow Profile

view full profile »

About

I'm a web developer from the Sunshine Coast, Australia. more »