Home » Code examples, bugs/fixes and "how to's"Random bits and pieces I have found scattered across the inter-web » Opencart - Open Source php shopping cart

Shopping carts pose an interesting challenge for web developers. Having worked on several e-commerce websites, they all seem to have one thing in common...they are very different!

With all things web, there are usually several large commercial solutions in addition to even more open source projects to cover every possible project. In my experience I find the open source solutions better, as commercial projects simply cannot bring to bear the combined development time an open source project can.

With this is mind I looked at a few shopping carts. The criteria I applied was simple enough. The cart should be:

  • SEO friendly: Nice neat seo urls. Title tags generated from product and brand names. Ability to add custom META tags.
  • Template-able: This is a huge factor when choosing a cart. Just how easy is the cart to customise with your own unique design.
  • User friendly: You don't want the client spending weeks trying to figure out how to add products and manage orders.
  • Scalable: The cart will change down the road, and adding new functionality should be relatively easy without major hacking.

A lot of developers who work with these various platforms will probably not agree with my finding and criticisms below. Please note that I applied the points above and there was a clear winner: www.opencart.com.I know I missed some well known carts such as X-Cart but I did not have time to demo every cart out there!

OScommerce and ZenCart - http://www.zen-cart.com

These two very well established shopping carts are "kind of" cut from the same stone, with one being a branch off from the other. In terms of the criteria above I found both had seo friendly urls, and support METa tags. They both suffered in the "template-able" stakes. Having reviewed many of the sites built they seemed to be heavily table based. In addition to this the ZenCart back-end manager was daunting and unattractive. It was mainly the back-end that turned me off ZenCart, and a couple of posts on the forums lead me to me to believe that developing custom modules would not be very straightforward.

Magento - http://www.magentocommerce.com

I was at first very impressed with Magento. It cannot be denied that it is one of the most comprehensive open source e-commerce platforms out there, however it's not there yet. Having installed Magento I found the back-end as slow as hell (with only a handful of products). I also found that with Magento the back-end was probably a little too involved for the scope of my project.

Where Magento fell down for me was the templates. The system may be intuitive, but I find it hard to use the word intuitive with a system that took me 3 days to figure out. Making a new template and design in Magento is a big deal. The template system uses a series of xml files to link functionality and presentation. It took me half a day to remove something from the footer, this is mainly due to the fact all the design/template docs are out of date, and all the file names had changed. I see huge promise for this CMS, but if they could take the templating system from something like MODx I would give them a 10/10 :)

Presta Shop - http://www.prestashop.com/

It's made by french people so I could not use it...JOKING :)
Saw this cart late in the day and had no time to try it. Looks very good with lots of modules. It's web 2.0, whatever the hell that means :)

Open Cart - http://www.opencart.com

I guess the biggest draw to open cart was the painless template system. Opencart uses an MVC framework to make creating your custom design easy. The "M" talks to the database. The "C" talks to your page....which is the "V" (simple!) By working off the default template I was able to create a custom xhtml compliant template that was fully functional. Any tweaks or edits I needed to make are made in the individual .tpl (template files). If you need to add functionality you simply open the corresponding controller (.php) file and add in your php to do what you want. If you need to query the DB you look to the model (.php) files.

In terms of SEO opencart supports MOD_rewrite so making nice neat urls is not an issue. At the moment there is a field that allows you to add your own META description. I did note that this field is limited to 66 characters which is easily fixed by increasing this in mySQL.

Open cart leaped ahead of the rest for me as it made adding products a breeze. The back-end is well laid, and very easy to use. The back-end seems to be geared towards what the majority of clients will be concerned with: My Products, My Orders and My Customers. Adding products is very easy, and the front-end has a nice ajax tab system that supports multiple images, product description and user reviews. I added about 20 products into the test environment in about and hour, including images and descriptions.

The feature I like the most about Open Cart is the ease with which I could create custom functionality. It was simply a matter of opening a controller php page that contains a class that extend the master controller class. I could then drop my own php into the page and echo this out on my html/php .tpl file. This approach takes away the need to hack the core, and means that upgrading to future versions of Open Cart is possible.

In about 2 days I was able to build a custom module to integrate Realex Payments into Open Cart. The module is no longer available however as sadly it is out of date. Daniel over at OpenCart.com likes to release a new version every other day :) (keep up the good work Daniel)
10/10 Open Cart, keep up the good work guys!!!

Write a comment

Required fields are marked with *.


If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code:
 


jusmeig
Posts: 1
Comment
Sorry not supporting it anymore :(
Reply #3 on : Fri September 24, 2010, 20:46:38
Anwar,

I did write the initial payment module, but im no longer supporting it.
There is one available on the opencart site for about $40?

Sorry :)
anwar
Posts: 3
Comment
realex payment in opencart doesnt work
Reply #2 on : Fri May 28, 2010, 12:51:21
realex payment in opencart doesnt work..can you help me?please

it directly goes to success page.. it seems like realex.php in controller doesnt do anything..

thaks
Anwar
anwar@looogobd.com
Daniel
Posts: 3
Comment
Greatest reviews ever
Reply #1 on : Thu April 29, 2010, 00:42:12
thgese are the best reviews I have seen. I really like the opencart one!