You are here:  » Display Product Counter

Support Forum



Display Product Counter

Submitted by Stew on Tue, 2011-01-18 15:57 in

Hi David, not sure if this ones possible but I am trying to display on my homepage (I'm using external.php) a total number of products.

I do however only want to show the number of "bluewidgets" within all feeds (As my site is niche and I don't focuss on any other other feed products).

Therefore is it possible for a script to count the number of products with "bluewidgets" in the title within the feeds and save this as a variable for future output?

Many Thanks

Stew

Submitted by support on Tue, 2011-01-18 17:05

Hi Stew,

It could be implemented as a daily count, returned from a "countcache" table (where products counts for specific keywords e.g. "bluewidgets" are stored).

The count could then be called up with a simple bit of calling code:

<?php
  $external_path 
"/path/to/pricetapestry/";
  
$external_showCount "bluewidgets";
  require(
$external_path."external.php");
?>

Shall I patch this into the external.php from your earlier email?

Cheers,
David.
--
PriceTapestry.com

Submitted by Stew on Tue, 2011-01-18 17:08

Hi David,

I think I follow here :-) - yes that would be great - yes if you can add that into the same external.php

Thanks

Stew

Submitted by support on Tue, 2011-01-18 17:16

Will do - probably be first thing tomorrow now but I'll get the file and dbmod script (to create the cache table) over to you...

Cheers!
David.
--
PriceTapestry.com