Worldpay Payments Extended Payment Module

March 18th, 2017

Released some time ago now, this extension to the standard payment module adds a couple of features:
– if the payment is cancelled in Worldpay, the shopper is returned to the shop checkout to choose another payment method
– for successful payments, the fraud checking information is carried through to oscommerce and recorded in the order history

Available to download from the addons area and also from a branch off the master in a fork of 2.3.4BS – see the wiki in my fork:

Paypal standard for osCommerce 2.3.4(BS)

January 19th, 2016

At the time of beginning this article, I’m still in the midst of a painful process to get working Paypal support on an oscommerce 2.3.4(BS) store. At this stage it’s a cautionary tale.

In testing, the paypal_standard module worked fine in sandbox mode, but was not tested in live mode.

We went live, and following payment through paypal, although processed fine in pp, the error “Could not verify the PayPal transaction. Please try again.” showed on return to the store. In the meantime, however, the IPN went through and updated the order to the appropriate status and added the comment verified.

The debug email showed only partial data being returned – no result and some get vars:


[tx] => 6M910349SK180201D
[st] => Completed
[amt] => 1.20
[cc] => GBP
[cm] => 947
[item_number] =>

After a couple of hours fiddling about without getting any further, I re-implemented the old payment module from osc 2.2. I’m not happy with that either, as the ipn seems unreliable (though it was fine before the upgrade). So there are two paths of ongoing work, see if I can get the standard module going from a test osc install but against the live paypal account without the error and see if I can get the app going. The latter is fodder for several articles by itself.

Anyway the lesson learnt is – always test paypal integation against the live paypal environment as well as sandbox. Even if it’s just to make sure you have all the credentials right!

Setting up shipping modules in online shops – flat rate methods

January 5th, 2016

Flat Shipping Methods

The simplest way of charging for shipping is using a flat method. This means that the shipping charge doesn’t change depending on the customer’s order. It could be that you offer free shipping to everyone, or that you charge everyone the same.

This doesn’t imply you’ll send the order anywhere in the world for the same price, but it should be the same for anyone in your home country. If you are going to ship internationally, you probably want to restrict the destinations, or charge differently for some of them. If so, you’ll need a geographical method.

It also doesn’t imply the customer has no choice: you can still offer standard and express shipping, each of them charged at a different flat rate. In this case you’d be setting up two flat-rate shipping modules.

Flat charging methods are clear for your customers to understand, quick to implement and easy for you to explain on the site. Typically they are seen favourably by people placing high value orders, but may appear expensive to someone buying a single cheap item. Since the shipping charge for each order may not bear much relation to the shipping cost for each order, you need to monitor how well these balance out.

If you want the shipping charge to vary with the customer’s order, eg. free over £100 or heavier orders cost more, take a look at Table Rate Shipping Methods.

If you want the shipping charge to vary with the delivery address, find out more about Geographical Shipping Methods

Setting up shipping modules in online shops

January 3rd, 2016

Shipping Introduction

Shipping costs are complicated, generally speaking. For each business there are many possible options for the carriage of their orders. The costs to the business of shipping each order can vary depending on the choice of carrier, the destination country, the destination postcode (zipcode), the size of each package, the weight of each package, the number of packages in the order consignment – and the rates for all of this may vary according to the volume of orders sent out. If your freight is not collected by the carrier, you also need to factor in the cost and/or inconvenience of taking it to the drop-off (e.g. post office, parcel shop, courier depot).

If you’re lucky, the stuff you’re selling is all more-or-less the same size, shape and weight. This makes it an easy decision to choose how to send it and doesn’t need anything hard to set up in your store.

Typically, however, a business picks a combination of shipping methods based on their cost, reliability and convenience: e.g. mail, express parcels, slow parcels and freight. The customer is usually offered a simplified choice between a faster and a cheaper alternative for their order.

While it is possible to implement shipping charges that reflect the cost to the business of shipping each order, this can require a lot of investment in setting up the product data to support it, and it can be off-putting to online customers if delivery prices are unclear or appear high. It is common to implement a charging model in which small profits on delivery of many items off-set the losses on some orders, or where the profit margin of larger value orders is used to cover their shipping.

So the first step is to get an idea of the costs – either by looking at the orders you sent if you’re already trading, or by looking up the rates of the methods you’re planning to use if not. Check also for variation by location (more for outlying areas, other countries and so on), and for restrictions that may apply to individual products – e.g. glass or liquids excluded, size/weight limits, dangerous/illegal goods.
Keep a list of these variations and exceptions – you’ll need it when trying out the different shipping models for a good fit.

Now go through the various shipping models to see which seem to make sense for your store, and try out some numbers for the ones that look promising.

Simplest: Flat Rate Shipping

Remote access to MySQL – error 10061 can’t connect to MySQL server – host is not allowed – user is not allowed

February 15th, 2015

I’ve just been reviving my ubuntu (linux) server on the LAN to do some interface development and testing, and thought it would be easier to work if I had remote access to the MySQL databases to use something a little more productive than phpMyAdmin.

Poof! What a palaver! All up and running now, but time to make some notes in case I ever have to do this again. In case it matters, it’s the long term support LTS version of Ubuntu 12.04 (purple pangolin IIRC).

Anyhow, the default install of a LAMP server (linux/apache/mysql/php) doesn’t allow remote access, so you have to set it up.

The original error was

SQL Error (2003): Can't connect to MySQL server on hostname (10061)

Read the rest of this entry »

osCommerce / Quickbooks interface

February 9th, 2013

Recently released: interface between osC 2.2 and Quickbooks using QBWC

This is a complex & rich implementation, which linked an existing online catalogue & customers with existing inventory and customers in Quickbooks, which is used to record high-street shop customers and transactions. Ongoing functionality keeps stock levels in sync and feeds online transactions and customers to QB.

As well as semi-automated take-on, there’s flexible matching support that makes it straightforward to link the two inventories – no automated product/item creation.

The Quickbooks Web Connector (QBWC, available free from Intuit) runs on a pc alongside the desktop versions of Quickbooks, and communicates with a SOAP server based on ConsoliByte’s PHP integration framework. This was developed to implement the necessary calls, plus a transaction manager within osC to group together the several interface calls needed to support a shop transaction.  The main constraint is that QBWC requires SSL (but then, so does a fully integrated implementation of Googlecheckout/Google Wallet).

I expect to begin a simpler QB interface implementation for another site, based on osCommerce 2.3.1

cgi on cloud hosting

October 4th, 2012

Copying a site from cpanel hosting to cloud hosting… contact page uses cgiemail to send the message.

Testing the contact page (using the domain alias before changing the nameservers) fails with a not found error on accessing the script and include file.

Trying to access the mail script without the following bit of the path attempts to download the file instead of run it, so it appears to be a web server config problem.

Try adding a handler in a .htaccess file in the cgi-bin directory:

<FilesMatch “cgiemail”>
SetHandler cgi-script

Following that, if you get an Internal Server Error (500), try setting the file permissions to 755.

osCommerce 2.2 Errors on copying a store to a new server

August 5th, 2012

Recently I’ve been setting up a test server within the LAN (to be able to use Quickbooks Web Connector without an SSL licence) and have had to resolve several errors relating to setting up a copy of an osCommerce 2.2 store.

Some issues relating to .htaccess files:
– these are used particularly in shared hosting to set specific system options that you might better set as server options on your own server
– a new LAMP installation typically defaults to not processing .htaccess files, so they are ignored
– when copying a store with URL rewriting enabled, the page links within the store are set to the rewritten URLs, but the server rewriting rules for the store are contained in the .htaccess file in the catalog directory and being ignored by default
– enabling the .htaccess files causes both the catalog and admin sides of the store to fail with Internal Error 500s
– the catalog side fails because other default server settings do not allow the .htaccess files to override server settings so you have to set AllowOverride to On for the URL rewriting
– the admin side fails because the password protection settings for the directory refer to paths and files on the old server

New client site released:

July 5th, 2012

TotalHealthNow is a familyrun alternative health business. The web site contains background information on therapies as well as offering products and mailing list subscription. Future plans include e-commerce.

The layout design expands to fill the full browser width and is optimised for search engines so that the different central content of individual pages is contained nearer the top of the html irrespective of the column layout.

Visit the site and see for yourself:

New client site released

April 18th, 2011

Actually, this is rather old news – it was released back in October 2010!

The site is an e-commerce site based on osCommerce, with a lot of add-ons and a certain amount of bespoke development, including postcode-based shipping calculations. The catalogue was initially seeded by taking on data from an ms-access database.

It’s currently hosted at but may be relocated to a sub-directory of the main company site ( at a later date.