Comparison between Opencart And Magento

For last several months i have been working on two most used e commerce frameworks in open source Opencart and Magento

There are lot of comparisons are available between two saying which one is strong and flexible about support and other factors.

I would like to add some thing on this topic too

First I came across opencart framework around year back, at that time I was new to any framework, so started exploring and got  a totally new experience.

within a couple of mins i m ready with default framework options with some sample data a full working admin a nice template and working e commerce site.

After couple of days I showed it to my seniors and they asked me to prepare a demo for diamond trading  site. I have no reference in hand just a basic three page design.

home page category page and details page.

I searched for some content on web for diamond related thing and came up with

On this we got couple of more projects to do, and i become familiar with opencart. Such a simple framework, you dont have to do much to explore, and also if u need to change some functionality

the code is open and easy to modify

Few days later for some project the client is specifically asked for magento, another e commerce framework.

I downloaded next day and you dont believe it took around two days to understand the installation process and set up the default functionality

After week too i m struggling to set up the common options like category products reviews shopping cart etc

Its too horrible, another thing what i came across it not accepting localhost as the default host name, you need to provide the local IP address in the config file for admin to work

An explanation given by experts that its for live domain and for localhost

Another huge issue i got with database shifting from local to live, It took me around one hour to check where is damn config file for database

where in opencart its much simple in the main folder for admin and for front end u will get the config file with simple variables

Another issue with magento is bulk upload product say around 50k or 100k or more dynamically via script, It took me around two days to find out the exact database structure where magento insert the data

In couple of forums i got solution to use the magento default controller via Mage.php file and use the insert method with parameter assign and use it in loop

I thought the problem is solved but the script took horrible time to insert the products in bulk. I checked with fewer products it loaded fine but as the count increased the time increased exponentially

For opencart it took around 10 mins to understand the product database and i build the script in less than two hours for the first time and inserted the 100k records in less than two mins.

When it comes to customization of both the framework Opencart community always helped me a lot with quick response where in magento i got suggestions to use paid modules for the same functionality


Following image will explain you in detail characteristics of each of them

Comparision between opencart and magento

Comparision between opencart and magento


Magento Add product via script

Magento allows several different ways to add products to the catalog, including manual editing, upload via spreadsheet and the web services Magento Core API. For developers who want to add products through PHP however, there are a few caveats to be aware of for the product to be displayed on the frontend.

The basics of adding a new product are trivial – you get a new copy of the appropriate model, fill in the details and call the save() method:

$product = Mage::getModel('catalog/product');

$product->setName("Type 7 Widget");
$product->setDescription("This widget will give you years of trouble-free widgeting.");
$product->setShortDescription("High-end widget.");
$product->setAttributeSetId(9); // need to look this up
$product->setCategoryIds("20,24"); // need to look these up
$product->setTaxClassId(2); // taxable goods
$product->setVisibility(4); // catalog, search
$product->setStatus(1); // enabled

// assign product to the default website


The example above shows a minimal set of attributes you should be setting on a new product. If you run this code and look under Manage Products on the backend, you should see your new product. However, the real trick is making sure they appear on the frontend.

The product should now be appearing on the frontend, but it will probably be showing up as ‘Out of stock’. A product’s inventory and stock options are contained in a separate object, rather than as part of the product itself. Adding the following code somewhere between the getModel() and save() lines will allow you to set the stock data:

$stockData = $product->getStockData();
$stockData['qty'] = 10;
$stockData['is_in_stock'] = 1;
$stockData['manage_stock'] = 1;
$stockData['use_config_manage_stock'] = 0;

This code gets the product’s stock and inventory options as an array, modifies them and then saves the array back to the object. The options should be self-explanatory – the important one is ‘is_in_stock’, which controls whether the product is in stock or not. The example above sets the product’s ‘Manage Stock’ attribute to ‘Yes’ and un-ticks the corresponding ‘Use Config Settings’ checkbox, so the product will always track stock regardless of the global config setting. This is just an example, so be sure to set values appropriately for your store.