[support] counting nodes

Fred Jones fredthejonester at gmail.com
Mon Aug 20 16:42:47 UTC 2007


I have a new site with a custom node type--each node is also a product 
for the ecommerce. Each node is assigned a taxonomy term. We want to 
monitor the number of nodes of each taxonomy term which are not sold. 
The site owner wants to receive an email if the number of available 
'products' falls below 25 so that he can make more.

This is not an inventory issue--each product only has a quantity of 
one--this is a 'catalog' issue.

I figured the only solution is a little custom module that checks that 
number of products available in each category and if it's < 25, send an 
email.

Is that the right way? If so, are there any nice API calls I can use to 
make this check? I am not a real Drupal expert so my first thought of 
course it just to write the raw SQL, but I imagine there is a far more 
elegant approach.

Thanks,
Fred


More information about the support mailing list