osCommerce-2.2rc2a

June 7th, 2008 | by Sean |

Installed the latest stable osCommerce distribution today, on a new domain. It’s a slightly newer version than the one that’s providing the Lolyco.com shop. The installer is a breeze. There’s a chance I overlooked some of the installer’s complaints last time. On the front page of the installer there’s a ‘Server capabilities’ box:

osCommerce install Server Capabilities Box

I use cURL and OpenSSL almost daily, so I know the core software is installed for those two. The ‘slackpkg’ command tells me I also have GD installed. PHP is installed from source on this server, and a quick check of ‘./configure –help’ tells me there are command line arguments to switch on support for these extensions that I didn’t previously use.

I usually keep a text file hidden away somewhere that I use to make notes of all the substantial changes I make to my servers, to refer to in cases like this. That text file can be vital in a catastrophe too – if you can’t get an image of the server software running on a replacement machine, it can be useful to know how to rebuild the server software from scratch. If you don’t keep notes, but you don’t delete your source trees after you build them, you can often find a copy of the configure arguments you last used in a file called ‘config.log’.

To add the support for the missing extensions, all that needs to be done is to reconfigure the makefiles by adding

--with-gd --with-openssl --with-curl

to the configure arguments. To see the effect of the changes, complete the PHP make and install process, and restart your webserver (I forgot this last bit for a few heart-stopping, dizzying moments when all the sites on this server stopped working. Remember kids, don’t work on production servers!).

Once the osCommerce install page was refreshed, all those red crosses had turned to ticks. After setting up a MySQL database for the osCommerce shop, and filling in the database credentials and location on the installation page, you’re finished – osCommerce is installed and ready to go!

Installation really couldn’t be made much simpler, in my mind. Which is why the first view of your new online shop is such a shock – it’s UGLY! Unlike many other open source projects that support you in changing the look of your website, osCommerce provides no built-in help at all for changing the theme of your sites. There are lots of very cool open source themes you can use though, just visit the osCommerce Templates and Themes collection. I’ve got to confess to giving up with this option – the first theme I saw that I liked required the complete replacement of all the PHP code in the whole project. If you’re at all bothered about the security of open-source projects, that’s exactly the sort of thing you should avoid like the plague.

I resorted to copying and modifying the theme from Lolyco.com – maybe this can be a little time-consuming, but this is what makes open-source great, in my mind. I can take something I’ve used before, modify it to fit a new need, maybe even improve both sites while I’m at it. Once I’ve setup the look of the site, I just need to copy across some shipping and payment methods, setup the products and the static content of the site (terms and conditions, about us – that kind of thing) and I’ll be ready to sell! Stay tuned for part 2.

Post a Comment