Affilistore Quick hack - Display number of products
It add
s nothing to the functionality, but with the switch to the Affilistore v2.01 engine it has become a much simpler proposition to add a count to your site of the size of your product catalogue.
This comes about because it is easier to count products in a single product database rather than to add the product counts from many (and a variable number of them).
The following steps will show you how to do it.
I know that many people like to see these added elements, so if you are one of those people, it is but a 2 minute job to make this happen.
Simply add the following to your index.php file :
//get product count
$getcount = mysql_query("SELECT count(*) count FROM affiliSt_products1");
$productcount = mysql_fetch_assoc($getcount);
$body->assign("PRODCOUNT",'Now serving ‘.number_format($productcount['count']).’ products.’);
Where you add it isn’t particularly important, but now you can the {PRODCOUNT} tag wherever you see fit in your .tpl skin fies.
If you want to see this in action, then visit my DIY Tools & Accessories store. Incidentally, that site is running via the hosting that I am considering reselling (see here). As you will see, my site is running at a decent speed even although it does not use any PHP caching.
If you would consider a tailored hosting package running in the same environment, please respond via the forum postings.
Edit: Sorry that somehow the code got screwed up - Wordpress does not naturally like to present PHP - the version attached should work. I don’t believe in censorship, hence the comments appear here as given. However, I do appreciate civility, gine that I am contributing to the community.

Your quick comments RSS Feed
Ah had a bit of trouble getting this to work, but I found that it worked best if I had placed the code underneath //hompage {blabla}.
Modified it a little bit to fit in well
Thanks for the hack I feel it will be useful and may (unlikely but hopefully) attract a few more of the visitors to browse around a little longer than usual.
So long as you enter the code into a new block of code anywhere in index.php (outside of any if statements, then it shouldn’t matter).
You might like the new hack I posted on a similar vein for the Admin area.
I doubt that it will keep most visitors around. It is just something else visual and dynamic.
Your code is wrong.
size=”2″
one character is worng, guess which…
Actually, the your whole sourcecode is fucked up, damn
Please correct it.