Category Archives: Code Tips

Are you an existing customer?

I suspect that most store owners would like their customers to purchase more than once – I know that I like people to purchase my products as often as possible! I’ve never really explored the avenue of “returning customers” to any great degree. My idea this morning is to optimise the checkout (covered in a… Read More »

Let’s see what we have here

“Let’s see what we have here” – a piece of text that shows as the title in each of your category pages. Absolutely useless! You should change this to something more interesting and useful (in terms of user experience and SEO) such as the title of the category – doing this is very simple… Open… Read More »

Clear Cart, then add a product automatically

Frank asks; I’m trying to create a page that when someone visits; automatically empties the shopping cart and then adds one specific product, so the cart will only have that one item whenever the customer loads that page. I thought this was an intelligent and interesting question – and as no-one else was helping, I… Read More »

Finding Text that you want to change

osCommerce is set up a little differently to a “normal” website.  Put simply, this is because the “base pages” are the structure and “language pages” are pulled into the structure automatically. index.php product_info.php and all the rest of the pages are your “structure pages” – these should only be amended if you are adding contributions… Read More »

Random Products on Front Page

Almost daily, I see this question asked in the osCommerce Forum… How can I have 9 random products showing in the the “New Products For…” box in the front page of my osCommerce site? The answer is really, really simple – you need to change the SQL that selects the 9 products, like this; Open… Read More »

Updated for ’08 – Make Your osCommerce Faster

I just finished up the next osC Book update – ‘How To Make Your osCommerce Faster‘ – in this eBook I show a number of methods that will speed up your osCommerce store. Some of the changes are very simple, some are more advanced. This morning, I installed a brand new osCommerce RC2 and managed… Read More »

Reversing the order of the cart contents

In the osCommerce forum, someone posed an interesting question; does anyone know how to reverse the order of the shopping cart dsiplay so that new products added will go onto the top of the list rather than the bottom. Having thought about the question for a minute or two, this actually makes perfect sense and… Read More »

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… Read More »

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… Read More »

MySQL Server DOWN – oh no!

In the official osCommerce Forum I got into bit of a conversation with a Store Owner, part of the conversation was all about what happens if your MySQL server goes down whilst the webserver is still up and running. For those who don’t know, MySQL runs on it’s own little server as part of the… Read More »