Phew, only a week late and and several late night’s work, and the shop is now ready and open, available now at def-proc.co.uk/shop.

I have a preference for having each of the site’s functions run by software that was designed to do it (the front-end CMS is MODx, and the blog platform is WordPress), the shop is being run by OpenCart. Obviously, as a small company, there’s no way we could afford to incorporate our own payment gateway, so we’re using Paypal to deal with the actual charging bits.

All-in-all, the OpenCart theming and customisation wasn’t much more difficult than finding the right line in the right files. The only major headache I came up against was setting up Royal Mail delivery option for Europe.

I wanted a lower price option for postage to Europe, as I can see that Interlink Direct is a bit pricey for low value orders, so I wanted to offer Royal Mail surface mail, and maybe even Airmail for overseas delivery.

In my testing, everything looked good, I cloned the Royal Mail shipping module, replaced the references to “royal_mail” with “interlink” and “RoyalMail” with “Interlink” and adjusted the pricing and logic. Everything worked fine. Or I thought it did, until I took the last step and tried to complete and overseas order (UK orders all worked without any trouble), then I found OpenCart throwing an error about “no shipping method selected”, every time I chose Royal Mail or Interlink. Bah.

As far as I can tell, there I something about the Royal Mail module that causes it to fail everywhere except the UK, even when I can be selected in the checkout. I had the same problem with the Royal Mail module in a fresh install of OpenCart, but when I rebuilt the Interlink module by placing the logic into a copy of another shipping module, it worked.

In the absence of finding the solution (and I need to post this in the OpenCart forums) My next job then is to write the surface mail and Airmail logic into separate module so that European customers can have their choice of shipping. But give me a few days, I’m gonna have a lie in tommorrow!

Of course, Airmail also means I will be able to get a set of plans to America or Australia in 7 days delivery time for a total of £25.20 (£16 - M0.1TD, £5.31 £9.20 postage and packing) when I’ve got my head round the export requirements…


OpenCart extensions typically have a number of files zipped in their folder structure, so I was quite pleased to find the format of a Linux command that could generate these archives from git without having to go through and recreate the file structure manually.

To pull out and archive the files that have changed since a particular git commit or tag:

git archive --format=zip --output="../archive_name.zip" HEAD git diff [commit number|tag name] –name-only`` (source: solvitor.com/2010/08/28/archiving-changed-files-in-git/)

Having said that though, it might actually be better practice to apply diff patches instead, so as not to destroy any changes if any files are overwritten. Either that or branch, copy, commit, switch back to the original branch and merge in git.