Refers to the freakdesign blog post.
Most people that need to know the total stock value are already likely to be using a third party Inventory Management System, ERP (or similar). If you want to know what your total stock value is you can grab that info via the API - let's look how.
Paste the code into the browser debug console.