Google Adwords Conversion Tracking for osCommerce

Here’s the next script that I need a couple of testers for, a cleanly coded “Header Tags” module for Adwords Conversion Tracking, written for 2.3 series of osCommerce.

This basically installs very easily, like any other header_tags module and allows you to track your adwords conversions on a order by order basis.

What do you need to be a Guinea Pig?

1. You need to be able to install a Header Tag module.
2. You need to be spending on adwords
3. Your site needs to have a “success” page aka checkout_success.php


Email me on oscshops AT gmail DOT com

Shop To It and osCommerce

One of my North American clients required the ability to add their products to Shop To It.

What is Shop To It ?

Shop To It is pretty much a shopping comparison service used almost exclusively by Canadians. Vendors can upload their products, prices etc and buyers can hunt down the items they need, click through to the vendors site and make the purchase.

There is no addon made for Shop To It that works in a proper fashion, and so I emailed a canadian colleague to enquire as to whether he had already created something – no response.

I set out to create a new Shop To It feed creator from scratch. Within a half day I had the basics sketched taking hints from the Shop To It developers area – and another half day to clean up the code led to a system where I grab all the required data, insert it into a CSV file, which is uploaded into Shop To It.

The CSV file contains all sorts of product data, including name, price, stock, sale price, options and attributes, description, short description and more. It takes around 12 seconds to create a CSV file for 3000 products (remembering that most of these products have multiple attributes to deal with). Not bad.


So, now for less than a minutes work once per week or so, the Shop Owner can upload a feed into Shop To It, keeping on top of all his products without fuss. This stunning little script has already paid for itself, just by getting a couple of new clients spending money at his shop.

Sell into the Canadian market?

Do you sell into the Canadian market? Want to purchase the Shop To It feed module? Contact me.

Twitter Cards for osCommerce

Twitter Cards are a new(ish) service from Twitter. In a nutshell, they give far more info than the standard 140 characters, including image, product name and other information. This is going to be BIG for promoting your products on Twitter.

How does it work ?

You add extra code (* see below) to your product pages. When someone tweets a link to one of your products, instead of seeing the URL only, they actually auto-post a “card” detailing your product! Everyone who follows the tweeter gets to see the card…

In this way you can present your products on Twitter far more professinally.

Here is a typical “Card”


I’m looking for a couple of Test Guinea Pigs

I’ve coded this up as a 2.3.x Header Tag Module, and am now looking for Testers. In order to be a Tester you need to know the following:

1. Your thumbnail product images must be at least 280px by 280px, or you must create a special Twitter image of 280 by 280 for each product in your shop.
2. Once installed and tested, you must apply for authorisation via Twitter. Which means you have to have a Twitter account. Authorisation takes weeks.

It’s a 2 minute install, but you will need to amend your images or make new images. Interested? Email me.

Better Together Admin from Scott

My friend Scott over at That Software Guy is the go-to guy for discounting modules, and he has put together an Admin package for his “Better Together” system.

Better Together offers the following discount possibilities:

  • Two for one on product X
  • Two for one across category X
  • Buy product X, get product Y at a discount
  • Buy an item from category X, get an item from category Y at a discount
  • Buy product X, get an item from category Y at a discount
  • Buy an item from category X, get product Y at a discount.
  • Any of these may be configured using Better Together Admin for osCommerce. Why not try it!

You can even try it out before you buy it at the author’s admin demo site. The demo site is a Zen Cart site, but the admin panel itself looks the same in osCommerce. Click here to go to the demo site, and login with credentials test/test. The click on the Tools menu and scroll down to Better Together Admin.

To purchase Better Together Admin for osCommerce, contact Scott directly at along with your osCommerce URL and version number, to dicuss pricing etc. Better Together Admin works on osCommerce 2.2 and 2.3.

Mailchimp osCommerce Integration

One of my clients needs the ability to send professional HTML Newsletters and keep tabs on open rates, subscriber levels and all the rest of that data that should be interesting to every shop owner.

So, he set out to find a Mailchimp integration that;

1. works
2. has modern code
3. looks good
4. has the ability to talk both ways (osc > MC and MC > osc)

There are NONE that are made for osCommerce. So…let’s get started;

What is needed?

a. ability for new customers to tick the newsletter box in create_account.php
b. ability for existing customers to add themselves onto the mailing list
c. ability for existing customers to remove themselves from the mailing list
d. ability for admin to add or remove customers from the mailing list
e. if a subscriber deletes themself via the unsubscribe link (in the newsletter) their shop account is changed to reflect this
f. ability for NON customers to sign up

Let’s look at each in detail;

a. newsletter box in create_account.php


If this is ticked, I initiate a call to the Mailchimp API and the customer is added to the mailing list.
If this is not ticked, do nothing.

b and c. existing customer can sub and unsub


Simply by unticking this box to unsub and ticking it to sub.

d. admin can sub and unsub individual customers


This is at customers > {select customer} > edit

e. MC to osc, if an unsub occurs via the mailchimp API using a webhook.
Or, in english, if the subscriber leaves via the email unsub link, a signal is sent from Mailchimp which updates the customer record – and sets b/c and d to “unsubscribed”.

f. guests


A nice little infoBox that is ajax enabled, so the customer does not have to leave your site.

Bear in mind that all these changes (subbing, unsubbing) are done silently in the background – so they will not take away the main emphasis of your shop, which is to sell your goods/services.


Working with the Mailchimp API is fairly straightforward if you are able to think logically about what you require. It’s my opinion that all shops should be making use of a newsletter system be that Mailchimp, the inbuilt osCommerce system or whatever is suitable for your needs. If you don’t send Newsletters, you are missing out on a good way to garner sales.

And now the Sales Pitch

If you are using Mailchimp and want this modification for your osCommerce Shop – get in touch. Feel free to post any questions in the comments.

Flexible Shipping Module – Per Cent + Fixed

How about the ability to create shipping costs, as so:

1. Percent of Product Cost
2. Fixed Amount Per Product
3. Extra Cost if buying multiples

And then go further and say;

A. I want these amounts to be different per product
B. I want these amounts to compound (add up)

So, for example;

Speed DVD: Charge $3.00 shipping + $1.00 for each extra copy
Unreal Tournament: Charge 10.5% for shipping

Shipping cost If buying 2 of Speed and 1 of Unreal would be:

Speed DVD: 3 + 1
Unreal Tournament: 9.45 (89.99 *10.5%)

For a grand total of $13.45


Now let’s add in a 3 Microsoft Mouses for which we nothing for the first one and $5 each for the extras.


As you can see, the cost for shipping has gone up by $10. Now let’s add in the ability to have an overall handling fee on the entire order of $2.75.


Now let’s add in 3 of Blade Runner which ships free of charge irrespective of how many bought.


The price has not changed! Which is perfect.

So, if you think about this, you can mix and match a number of costs;

– overall shipping fee
– per cent per item
– per item
– per item per multiple buy
– free shipping per item

This gives unparalleled flexibility in terms of shipping fee!

Turn ordering off when on holiday?

Had a few requests for “turn ordering off when I’m on holiday” and yesterday managed to find the time to put it together.


1. Ability in admin to turn off the checkout system, or leave it open
2. Ability in admin to set up a “we will be back on {date} message” and other “info” messages
3. Show an obvious message in the header of the shop
4. Show an obvious message in the header of the admin area

In less time than it would have taken to find a suitable existing addon, amend it appropriately and install, I made a new modification – with a few database entries, 1 block of code in admin/includes/template_top.php, 1 block of code in both stylesheets, and 1 block of code in includes/template_top.php.

Here is how it looks;




So, the admin can choose between 3 options;

a. Checkout = open. Checkout is as normal, no messages show.
b. Checkout = closed. Checkout is closed, those trying to checkout are redirected to shopping_cart page.
c. Checkout = partial. Checkout is as normal, but messages do show.

All in all, a nice little modification that has very little weight of code, so is easy to install on any osCommerce shop, even highly modified templates.

Previous and Next Links in Product Info Page

Someone messaged me with the need for a “previous” and “next” link in product_info.php, which links to the previous and next product within the same category.


1. If there is only 1 product in the category: do not show next link, do not show previous link
2. If the viewer is looking at the 1st product in the category: do not show previous link
3. If the viewer is looking at the last product in the category: do not show next link
4. For previous and next links, show the product name

There are a couple of contributions that can do some of this [1] [2]. Both of these are coded poorly, so it is time to come up with something new.

A. Grab the other products in the category being looked at.
B. Pass these into an array
C. Use array functions to grab the array entries either side of the current item
D. Pass those entries into jqueryui buttons and mine the products name

It ended up like this


And in action

Need something similar? Email me, and you can have this for a beer fee.

Currencies as Icons in 2.3.x

Almost exactly 5 years ago I posted about using icons for currency selection. The question still comes up fairly regularly in the osCommerce forum.

So, here’s how to do it in 2.3.x – you’re going to end up with something like this:


You need to make a “currency” icon for each currency that you have. In a standard installation of osCommerce, this is EURO’s [ EUR ] and US Dollars [ USD ]. Save them into the /images/icons/ directory as .png files like so; EUR.png USD.png

Next up open up /includes/modules/boxes/bm_currencies.php

Step 1: create a variable holder

$currencies_string = NULL;

this line of code needs to be placed in the execute() function, right underneath the line that starts global $PHP_SELF …

Step 2: create the variable

Here we need to loop through the available currencies and output them as an image. Code;

This should be added underneath this line of code: reset($currencies->currencies);

Step 3: Change the $data to output the $currencies_string

Done. Refresh your page and you should see your currencies box as images. Of course, I could make this into a better addon allowing you to associate an image with a currency from within the admin area, but that’s for another day if someone wants it badly enough.

In action

Latest osCommerce 2.3.3 Theme – Penny

This theme changes around 10 core osCommerce files so is easy to install even onthe most modified of sites. Have a look at the demo.

It is a 1 column design, so there is lots of available space on every page for promoting your products. It has a horizontal menu (with dropdowns), along with a much nicer footer area. Of course, the “new products” module is also updated.

The cost of this template? Just £16 (approx $25), and you could even get it for free by purchasing the “design oscommerce” ebook. If you would like to see my other templates I’ve recently built head over to choices page.