Just a few products? Dump the categories…

Years back I had a client who had only a few products in his store. Rather than use the category infoBox I rewrote it to simply give a direct link to each product.

It’s funny that I was looking at that store the other day (it’s on the Hot 100 list), and today someone in the osCommerce Forum asked for exactly the same thing.

Rather than try to find the file I used on that old site, I just rewrote the script. 2 minutes later, and here we are;



new infoBoxHeading($info_box_contents, false, false);

$products_list = ‘


$info_box_contents = array();
$info_box_contents[] = array(‘text’ => $products_list);

new infoBox($info_box_contents);


What this script will do is simply list all your products in a long list, instead of the category box. Easy as 123, eh?

Obviously if you use this script, you will need to set a style on the <ul and maybe the <li – depends upon what you want the list to look like 😉

oscmax zencart creloaded – bewildered!

Henry asks;

I am about to set up an OSC site but which one to use Oscmax, CREloaded, Zencart

CRE seem to have the best support but I like the Xshop software that goes with OSCmax.

None of the above! Why not go with a standard install of osCommerce and then add the functionality you need – rather than start off with something that’s a bit bloated and possibly contains stuff you will never need…

I am a wholesaler so need different pricing for different types of customers.

I use a contribution called “Customer Groups” on one of my osCommerce sites. Here’s a screenshot;


This gives me the ability to assign a permanent discout rate to a group of customers! The contribution is right here (it’s not one of my contributions)…I have added some extra coding to give me a list of all the customers in the group though – only to make it slightly easier for me to use.

Also do you know of any contribution that would enable a customer to buy something online and key in a code to say that they were referred from a particular shop that I could then pay commission to that shop whether it be a % or a flat fee or a per item fee and can some products be switched on or off so they not be included in the commission.

You’d probably do better to look at getting this coded from scratch – as, off the top of my head, I can’t think of anything that’s a perfect fit.  I guess that to get a good coder onto making somehting that fits your requirement would be fairly expensive…

I like your featured contribution as well and hope to install it when I get going. Do you do installs for people.

Thanks 🙂 I do installs, the usual cost is about $25 usd or so, but it depends upon what needs to be installed as to the exact charge.

Thanks, Gary

Top 100 Script – not an update!

I’ve been getting a lot of emails about the script that I am using to power the “Hot 100” list. It’s basically a script which was coded for me, which I call “5 Starred“.


At the moment, it costs $20, but I have it on offer at 1 Month – present price is just $2.00, which increases by $1.00 each day.


So, if you like the look of the script, feel free to get on over to 1 Month and pick it up at the cheapest price possible.


Featured Products in osCommerce

One of the very finest things you can do to make your customers experience better is to point them at your special offers and featured products.

In standard osCommerce, the “New Products” box on the first page is pretty useless – it’s just a list of the latest 9 products added. My idea is to use that box to show “Featured Products” instead – so I set about finding a cleanly coded solution.

Guess what? I couldn’t find one.

Sure, there are a few “featured” contributions, but all of them are rather clunkily coded (including one I made many years ago)! So, I set about recoding a few files to make adding featured products really easy.

Have a look at the video below;

Basically, my idea is to have a “flag” to set the featured status or not (in eaxctly the same way that you use it to set the product in or out of stock). This makes it really easy to set a product featured.

My other thought was to use the existing “New Products” box ratyer than have to code a new one – so I did!

The result is a cleanly coded “Featured Products” contribution that sticks to osCommerce coding convention and is easy to install. Just a few drop-in files if you install a new store, and if you have an existing store, just a few lines of code to add to a few files;

  • /admin/categories.php
  • /admin/includes/languages/english/categories.php (and obviously german etc)
  • /admin/includes/functions/general.php
  • /includes/modules/new_products.php

And that is it! I will zip it up and add it to the contributions area later on.

Passing $cPath thru Advanced Search…

In the official osCommerce Forum, someone asked for the ability to pass the $cPath variable through the Advanced Search Result “link” for each product.

Basically, instead of a direct link to a product, eg: product_info.php?products_id=10, he wanted product_info.php?cPath=3_11&products_id=10

The example obviously assumes that Product 10, is inside Subcategory 11 which is inside Category 3. Got that 😀

The code changes are minimal. There’s only two files to change and it goes like this:

advanced_search_result (about line 207)

Find this:

$select_str = “select distinct ” . $select_column_list . ” m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price “;

Change to:

$select_str = “select distinct ” . $select_column_list . ” m.manufacturers_id, p.products_id, p2c.categories_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price “;

/includes/modules/product_listing.php (about line 90)

Find this:

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
$lc_align = ”;

Right below it, add:

if (tep_not_null($listing[‘categories_id’])) {
$cPath = tep_get_product_path($listing[‘categories_id’]);

Done!  Save the files, upload and test the product links.  Feel free to Paypal me a donation if you find it useful 😉

Got STS, Got the Tutorial – Now you need a Template

As readers will know, I spent some time the other day updating the STS eBook for 2008 – my own knowledge has come on leaps and bounds since I first wrote that STS Tutorial, and STS itself has had at least 2 or 3 major updates as well.

Now that the eBook is up to date, I wanted to try to find a resource for purchasing templates. A reader of this blog pointed me at this site, on which there appears to be loads of designs ready and available for download.

Please note that I receive nothing at all, no commission, no kickback, no fee, no nothing if you purchase from the site – I have absolutely NO connection to it at all. I am simply pointing you at a site where you might like to buy a template.

I also have seen this site, which appears to offer much the same. Again, I receive nothing, no fee, no commission, no kickback should you buy from this site…

And, as I receive nothing – I don’t want anyone moaning at me if the template they buy turns out not to work, or be rubbish, or whatever! OK?

I cannot and do not vouch for the quality of templates that you purchase! The only template I can vouch for at the moment is my freebie that I posted about a while back.

Top 100 osCommerce List Update

Another couple of sites added in the past few days;

Which brings the total list of shops up to 71.  Only 29 more to go and then the lowest voted ones start to fal off the bottom of the list!

As of right now (March 30, 11am), the Top 5 shops look like this:

  • TexereSilk 6.6/10
  • Click A Deal 5.8/10
  • Templates Shop 5.3/10
  • Punk Baby Clothes 4.7/10
  • Assault Shirts 4.7/10

Have a look and see what you think of the shops in the Top 100 list.  There really are some exceptional ones – not only in look, but also in the codebase!

Is osCommerce right for me?

Nicole asks;

1. Should I steer clear of the RC version until it is released? If so which version should I go for?

The RC2a version of osCommerce is no more than osCommerce MS2 with a few bugs fixed and some security updates. I would go with RC2a as I believe it’s stable enough for a live shop…

2. Are there template clubs like rockettheme with professional looking templates?

I don’t know of any template “clubs”, but there are a handful of people selling templates and a handful of developers who are making bespoke oscommerce sites. I myself run an osCommerce Templates site, and I also have a free RC2 template right here

3.How long does it usually take to get OSC up and running?

If you are talking of just getting it up and running “straight out of the box” it should take no more than 5 or 10 minutes! Then of course, you’ll need to add on any extras that you need (such as contributions like SEO Urls, Discount Vouchers etc)…and then you’ll need to implement a design.

And then of course, you need to load the products…

I suppose the average site woner would probably spend a month doing all that?

4. DO you think Joomla/Vitruemart is a viable option considering I already know joomla?

That I cannot answer as I have no experience with Joomla or the Virtuemart addon.

5. If you think OSC would be the best option, how would you go about learning OSC if you were a newbie to it?

I’d install osCommerce and have a play with the codebase. I’d buy myself an ebook to get a good head start on 99% of all other osCommerce users ( ebooks sites: www.oscbooks.com & www.oscommercemanuals.com ) and I’d try my best to learn the in’s and out’s to see if osC is suitable…

Nicole, I think that osCommerce is very suitable for most store owners. It has it’s problems, just like any other cart, but the great thing is that the codebase is open so that you can change it up to suit your needs, and there are lots of people ready to help you out…

Does that help at all?

Cheers, Gary

ps, you can see some great examples of osCommerce sites at the Hot 100 list – so you can see that osCommerce is supremely flexible with the ability to do almost anything. In fact, I’d say that osC is only limited by one’s own imagination and skillset!

Updated for 2008 – STS Templates – the original and best eBook on STS

I have just updated the original and best STS Template tutorial eBook over at oscbooks – have a read about it, and if you like what you see, please buy it from this page, not oscbooks. If you do buy it, I still have a special “BOGOF” promotion – Buy One Get One Free…


Here’s a special buy link – the first 5 buyers will get this eBook and the associated files for just £10…sorry, offer now finished, the price is £14.99.


Here’s some comments I’ve received about this eBook;

I have just purchased your new book “osCOMM STS”. WOW !! .. you have done it again another great easy to follow manual. Whilst waiting for my printer to finish printing a hard copy .. I started to read the book on screen and already I am confident that I will be able to create a fantastic oscommerce cart.


I run a site on oscommerce and have no experience with .php. I bought and have used the new ebook from AIS (Gary) at oscbooks.com. Very well written, easy to follow and in the space of a few days I have learned a great deal. A really good product and a great guy to deal with.

osc-sts-new-thumb.gifSo, there you go – the all new, updated for 2008, STS Tutorial eBook – for a price that is kind to your pocket.

And don’t forget the “Buy One Get One Free” offer.

Just choose the other eBook you would like once you’ve purchased the STS Tutorial and I’ll send your chosen eBook free of charge!

Create this Store;


and take the techniques you’ve learned and apply them to ANY html template!

The Walk of SHAME ;)

I thought it might be interesting to post up URLs of sites that are using the Green Template I made without linking back to this blog (as is required)…

What I will do, when I find such sites, is send them an email asking for the link to be reinstated – if they ignore it, or just plain refuse, I’ll out the URL in this blog post, so that we can all see just who takes advantage of other peoples hard work, without a thank you…
Should be fun as I already found 2 sites this morning!