Category Archives: OpenCart

The State of Play of E-Commerce

Traditionally I am a full-stack developer, focussing on PHP. I work at a development agency, and lots of our clients have e-commerce websites. In fact, much of the Internet is based around e-commerce. That’s why I find it so difficult to understand the current state of play of the e-commerce offering.

PHP is the most popular programming language on the web. Lots of people have beef with PHP, but its popularity is a fact. As such, lets look at the PHP-based e-commerce solutions available.

Magento

Magento is the most popular e-commerce platform on the web. Many e-commerce sites I build are in Magento.

Magento has a few flaws that I would consider pretty major when choosing an e-commerce platform.

It’s slow. This is down to its fundamentally flawed database structure (built on EAV) and architecture (hundreds of XML files). Many major hosting providers won’t even touch a Magento website…

OpenCart Database Cache

I recently developed a plugin for OpenCart, the plugin (excuse the cheese) is called: Super FAST Database Cache.

I’ve been using OpenCart for years, and prefer it over Magento for a dedicated shopping cart (I’m quite fond of WooCommerce too). I decided to bundle up this plugin as I wrote it for a website that required a bit of a better caching solution than the out-of-the-box caching that ships with OpenCart.

The plugin is purely a database cache. It replaces the default MySQL driver, rather than the somewhat dirty vqMod implementations that seem to be the norm. The only drawback is that different OpenCart versions have different class names and locations for the drivers, even on minor version changes.

So how does it work? The database driver will MD5 hash the query, and check if a cache file exists with that name, if so (and it hasn’t expired)…