CS-Cart, A Very Excellent E-Commerce Engine

I’ve been in the Web Development Business now for more years than I care to remember. In that time I’ve worked with plenty of E-Commerce engines, some of which were entirely bespoke before ‘off the shelf’ solutions such as osCommerce or Magento existed.

In more recent years I’ve been using osCommerce. I took a look at Magento but reviews of its fairly serious need for horsepower and to be honest I found it quite difficult to get around. Before any Magento fans flame me I’m quite prepared to admit that is probably much more down to me than it is to Magento. So I stuck with osCommerce. I’ve released a number of E-Commerce sites based on osCommerce and in general I had been fairly happy with it. But, it’s very old technology now – my first shop was released back in 2005, on osCommerce 2.2 and today the platform is still the same, 4.5 years later. And I’m sure I wasn’t on the bleeding edge back then. I don’t want to bash osCommerce here either – that’s not the purpose of this article. But it is my basis for comparison and as such I have to point out the shortfalls it has when compared to CS-Cart.

I took the plunge and started looking at CS-Cart. It was a brave (and potentially stupid) move because I chose to investigate it’s use for a large client site. Sometimes when taking on a large project it can be better the devil you know. In this case though, I was pleasantly surprised. It was better the devil I didn’t know.

CS-Cart is based on the Smarty Template Engine and I have good experience with Smarty, having developed the more recent parts of DearDiary.Net in Smarty, along with the original version of Kabarty Collector, plus the playing around with WHMCS (which also uses Smarty) and a couple of other smaller projects. CS-Cart is also structured into a Model – View – Controller paradigm, which with my commercial background with Java Server Faces, Struts and CodeIgniter appealed to me from the outset. Perhaps having experience in both these technologies helped me to understand CS-Cart quicker than others might was an advantage but I soon found I could get around the software quickly and easily.

CS-Cart is written in PHP using the Smarty Template Engine, and although it is commercial software (which I might add is very reasonably priced at $265US) it does come with full source code so you can find your way around it. Just like the WordPress world though it is highly recommended that you do not make any edits to the core code. Doing so will make your upgrade path much harder – and it’s just about never necessary (although I did have to for one of my customers as it was a bug in the core).

CS-Cart uses a skin architecture (made simple by the use of MVC) so you can make it look exactly how you want – and I’ve applied a pretty radical design to one of my new sites. I’ll update the URL later once it’s been made public. But you can hook in jQuery effects and just totally radically alter the way the site looks whilst not having to stress at all about how the engine works. The engine is totally seperate from the display – which is how a modern system should be designed.

The engine also supports the concept of Add-Ons which means you can plugin extra functionality. In the case of CS-Cart these are quite literally ‘plug ins’. You don’t have to get your editor out and search for line Y in file blah.php and modify this query to show Z. You place the addon into the addons directory – possibly add the addon skin additions to the skins directory, and then activate the addon in the Administration screen. You may need to configure the addon and that’s all done through the Admin screen.

CS-Cart, straight out of the box, comes with dozens of Payment Gateways, including Paypal, eWay, WestPac (sadly, no Commonwealth Bank of Australia or ANZ (yet)), noChex and too many more to mention. Along with those payment gateways, it also comes with a bunch of pre-installed Postage Handlers, including live postage rate calculations from Australia Post and others. It supports multiple taxation models for sales tax, so if you’re a multi-national you can apply VAT to British Addresses, GST to Australian addresses and whatever other sales taxes you might need, all at different taxation rates as defined by you.

CS-Cart is also very user friendly for the customer. It contains its own Content Management System which allows the customer to add additional pages that aren’t product specific (for example, Terms and Conditions, Returns Information, Privacy Policy). The user does not have to understand any PHP to do this, CS-Cart provides an editor built into the Administration Screens.

Positively THE most powerful part of CS-Cart is found in its ‘Blocks Management’. This allows a designer of the site and/or addons to create blocks of content which can be placed on certain (or all) pages and the intuitive interface allows the cart administrator to move these blocks all around to fit how they want it to look. No need to edit HTML – the administrator simply drags the block from (for example) the left sidebar over to the right sidebar, or even to the top. The blocks manager seems to be almost infinitely flexible and even allows certain blocks to be only shown on specific product or category pages.

The only strange part I’ve found to CS-Cart at this stage is the business model that CS-Cart employs when a specific add on is required. You can write to CS-Cart and request a particular addon be coded, which they will quote you a price for. If you agree, and pay the price, they will code the addon. All good there. But that addon could then appear in a later version of the CS-Cart product – even though you just paid for it to be developed. It’s not a huge deal, and I think it’s just something that will happen more in the bespoke software world.

All in all, I’ve been really very pleased with the easy way CS-Cart can be extended and the intuitive and very powerful customer administration interface that makes it a great system to deploy to customers and not have to continually go back and make changes for them.

Why You Shouldn’t Just Rely On Subversion For ‘Backups’

If you’re developing a software solution, whether it’s for yourself or for a larger project, there’s plenty of source control products out there from CVS, Subversion or more modern solutions like git and Mercurial that distribute the load. Regardless of whichever you might be using, if you’re just developing personal projects, you’re probably using the source control so that if you make a mistake somewhere down the track you know you can always get back to what you’re working on today by looking at an earlier revision.

There’s some flaws to this when you’re working in a less structured environment;

  1. You probably simply won’t commit your changes often enough to be able to get back to a sensible status if you mess something up.
  2. If you’re using SVN and move a tree structure in place – particularly if you overwrite an existing tree structure – you just hosed all the SVN metadata. That leads to a whole heap of trouble when you try to commit.
  3. If you’re developing using WordPress you may get part way through your development cycle when WordPress issues an update. Or you may have tweaked a WordPress plugin that gets updated. If you mistakenly click the ‘auto update’ button you just lost all your local changes. Coupled with Point #1 above, you lost your work.

Enter TIME MACHINE (if you’re on a Mac – you’re on your own if you’re using Windows ;-)). It sits in the background and backs up hourly. So at least when you inevitably do make that mistake you only have to go back an hour.

Time Machine can be a pain in the butt when it slows your machine down while it does its backup – but that inconvenience will be priceless when you realise you really goofed up and mistakenly overwrote an entire directory that you were working in…

Trust me – I did exactly that last night with WordPress MU – developing a new ‘home’ theme for MU when I updated to 2.9.1 release and that overwrote all my changes. Yeah, it’s my own fault, I should have realised an update would include the ‘home’ theme – but knowing whose fault it is doesn’t comfort you all that much! Time Machine comforted me. If you’re on a Mac and doing dev work, I really highly recommend getting an external disk and backing up hourly with Time Machine. It WILL save your bacon on more than one occasion.

MacBook Pro Performance running Parallels

Or VirtualBox, and probably VMWare too.

Its been some months now since I made the switch from PC to Mac, using OSX Snow Leopard. Initially I was really pleased with the performance of the MBP, it was considerably quicker on lesser hardware than Vista had ever been. But there was a niggling slowdown on occasions.

It’s fair to say that I am a pretty heavy power user, I run Eclipse for web development work, and Firefox with various plugins, along with the real power hungry VirtualBox (and lately Parallels) for checking websites in Internet Explorer. The MBP runs quite nicely until I fire up VirtualBox. Then it gets dragged down and just generally feels like syrup on a cold morning, which can be frustrating because if you’re running a bunch of programs and suddenly want to find o2 Mobile Phones via Google or just run an antivirus check, watching the machine tank is pretty irritating. The odd thing is, the CPU was definitely not the problem because it never ran below about 85% idle, unless I was doing something heavy in the virtual machine but then it didn’t really matter because you’d expect that. I thought that perhaps having the 5400RPM drive in the machine might have been a mistake.

It certainly seemed that it was generally disk based activity that was really grinding the machine down. Safari was an oddball in the mix. It would often SBBOD and occasionally I saw weird graphical artifacts, particularly when first opening a new tab. Checking the disk usage I could see that it was getting used quite heavily, but that was mostly because the machine had nearly 2Gigs of RAM swapped out. On a 4Gig machine that means that I’m effectively using nearly 6 Gigs of RAM, which seems unlikely. It is of course OSX not Vista, so it shouldn’t really use that much! I’ve set the virtual machine to use 1Gig of RAM so that leaves 5G for the rest. Eclipse can be a beast, but it’s not that big of a beast.

Then I went to the Energy Preferences panel of Snow Leopard and made a tweak. I changed the graphics settings from ‘Better Battery Life’ to ‘Higher Performance’, which basically boils down to switching out the on board 9400M for the more powerful 9600GT big brother.

I’d expect graphics intensive applications to respond better with the 9600GT in place – but I don’t use all that many (occasionally PhotoShop comes out to play, but not often). Eve Online of course responds significantly better on the 9600GT, I’d already tried that some months ago. But what I didn’t bank on was how much better the whole system responds when you’re running Parallels or VirtualBox. It seems that the 9600GT allows much better virtualisation for some reason.

But the whole other issue that is totally obscure, and I really don’t understand why – so if you have an idea please leave a comment below – is that now, with all the same apps open, I have 300Meg of swap used. Not the 2Gigs I previously had. Needless to say, since there’s nowhere near as much swapped out, the whole system is responding much better. By a very long way. It’s like I’ve turned the MBP into a desktop machine.

The only downer is that the battery doesn’t seem to last as long – but that’s expected too. Having said that if the machine is more useable for the time it is alive then you can probably be more productive and get just as much done 🙂